Lines Matching +full:non +full:- +full:descriptive

12 # xolint -- a lint for inspecting xo_emit format strings
19 while ($ARGV[0] =~ /^-/) {
21 $opt_cpp = 1 if /^-c/;
22 $opt_cflags .= shift @ARGV if /^-C/;
23 $opt_debug = 1 if /^-d/;
24 extract_docs() if /^-D/;
25 $opt_info = $opt_vocabulary = 1 if /^-I/;
26 $opt_print = 1 if /^-p/;
27 $opt_vocabulary = 1 if /^-V/;
28 extract_samples() if /^-X/;
33 print STDERR " -c invoke 'cpp' on input\n";
34 print STDERR " -C flags Pass flags to cpp\n";
35 print STDERR " -d Show debug output\n";
36 print STDERR " -D Extract xolint documentation\n";
37 print STDERR " -I Print xo_info_t data\n";
38 print STDERR " -p Print input data on errors\n";
39 print STDERR " -V Print vocabulary (list of tags)\n";
40 print STDERR " -X Print examples of invalid use\n";
67 my $cmd = "grep -B1 -i '$x Should be' $0 | grep xo_emit | sed 's/.*\#*\@//'";
74 my $cmd = "grep -B1 '$x' $0";
82 if (/^--/) {
130 die "no such file" unless -f $file;
206 $current = substr($current, 0, -2) if $current =~ /""$/;
221 push @tokens, substr($current, 0, -1);
311 #@ properly converted to a libxo-style format string.
327 "start-anchor" => "[",
328 "stop-anchor" => "]",
334 "hn-decimal" => "@",
335 "hn-space" => "@",
336 "hn-1000" => "@",
339 "leaf-list" => "l",
340 "no-quotes" => "n",
367 #@ The hn-* modifiers (hn-decimal, hn-space, hn-1000)
395 #@ xo_emit("{:name/%6.6s %04d/%s-%d}", name, number);
456 #@ Field has color without fg- or bg- (role: C)
459 #@ xo_emit("{C:fg-green}{:foo}{C:}", x);
460 #@ Colors must be prefixed by either "fg-" or "bg-".
461 error("Field has color without fg- or bg- (role: C)");
463 } elsif ($val =~ /^(fg|bg)-(default|black|red|green|yellow|blue|magenta|cyan|white)$/) {
466 } elsif ($val =~ /^(no-)?(bold|underline|inverse)$/) {
473 #@ xo_emit("{C:fg-purple,bold}{:foo}{C:gween}", x);
475 #@ xo_emit("{C:fg-red,bold}{:foo}{C:fg-green}", x);
479 #@ be prefixed by either "fg-" or "bg-". Effects are
480 #@ limited to bold, no-bold, underline, no-underline,
481 #@ inverse, no-inverse, normal, and reset. Values must
502 # hn-* on non-humanize field
504 if ($field[4] =~ /,hn-/) {
505 #@ Field has hn-* modifier but not 'h' modifier
506 #@ xo_emit("{,hn-1000:value}", value);
508 #@ xo_emit("{h,hn-1000:value}", value);
509 #@ The hn-* modifiers (hn-decimal, hn-space, hn-1000)
511 error("Field has hn-* modifier but not 'h' modifier");
521 #@ xo_emit("{:tag-name/%s}", "value");
531 #@ xo_emit("{:no-under-scores}", "bad");
539 #@ xo_emit("{:10-gig/}");
541 #@ xo_emit("{:ten-gig/}");
544 if $field[1] =~ /^[0-9]/;
547 #@ xo_emit("{:WHY-ARE-YOU-SHOUTING}", "NO REASON");
549 #@ xo_emit("{:why-are-you-shouting}", "no reason");
554 if $field[1] =~ /[A-Z]/;
559 #@ xo_emit("{:something-meaningful}", "mumble");
560 #@ Field names should be descriptive, and it's hard to
561 #@ be descriptive in less than two characters. Consider
567 if $field[1] =~ /[A-Z]/;
570 #@ xo_emit("{:cost-in-$$/%u}", 15);
572 #@ xo_emit("{:cost-in-dollars/%u}", 15);
574 #@ instead of "{]:}". Field names are restricted to lower-case
577 unless $field[1] =~ /^[0-9a-z-]*$/;
606 if $field[1] && $field[1] !~ /^-?\d+$/ ;
632 return -1 unless $format;
670 #@ printf-style 'max number of bytes to use for input'. But this
672 #@ for non-strings. This error may occur from a typo,