Lines Matching refs:file

37 my $file;
123 my ($file) = @_;
127 if(($dir eq ".") && $file =~ /\//) {
129 if($file =~ /(.*)\//) {
169 my ($name, $num, $col, $file, $line, $msg, $error) = @_;
189 enable_warn($name, $num, $file, $line);
212 print "$file:$num:$col: $w: $msg ($name)\n";
221 $file = shift @ARGV;
223 while(defined $file) {
225 if($file =~ /-D(.*)/) {
227 $file = shift @ARGV;
230 elsif($file =~ /-W(.*)/) {
232 $file = shift @ARGV;
235 elsif($file =~ /-A(.+)/) {
237 $file = shift @ARGV;
240 elsif($file =~ /-i([1-9])/) {
242 $file = shift @ARGV;
245 elsif($file =~ /-m([0-9]+)/) {
247 $file = shift @ARGV;
250 elsif($file =~ /^(-h|--help)/) {
251 undef $file;
258 if(!$file) {
283 readlocalfile($file);
286 if("$wlist" !~ / $file /) {
287 my $fullname = $file;
288 $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
291 $file = shift @ARGV;
293 } while($file);
313 my ($file) = @_;
317 length($_)+11, $file,
325 my ($what, $line, $file, $l) = @_;
330 $line, length($what) + 11, $file, $l,
338 my ($cmd, $line, $file, $l) = @_;
363 $line, 0, $file, $l,
368 $line, 0, $file, $l,
378 enable_warn($what, $line, $file, $l);
382 $line, 0, $file, $l,
395 my ($file) = @_;
403 open(my $R, '<', $file) || die "failed to open $file";
420 checksrc($cmd, $line, $file, $l)
425 $file = $2;
455 checkwarn("LONGLINE", $line, length($l), $file, $l,
461 $line, length($1), $file, $l, "Contains TAB character", 1);
466 $line, length($1), $file, $l, "Trailing whitespace");
472 $line, length($1) + 2, $file, $l,
478 $line, length($1) + 1, $file, $l,
527 $line, length($1), $file, $l, "\/\/ comment");
534 $line, length($1), $file, $l, "duplicated include");
567 checkwarn("SPACEBEFOREPAREN", $line, length($leading)+length($word), $file, $l,
576 $file, $l, "we prefer !variable instead of \"== NULL\" comparisons");
584 $file, $l, "we prefer if(rc) instead of \"rc != 0\" comparisons");
589 … checkwarn("DOBRACE", $line, length($1) + 2, $file, $l, "one space after do before brace");
593 … checkwarn("BRACEWHILE", $line, length($1) + 2, $file, $l, "one space between brace and while");
601 $line, $pos+1, $file, $l,
619 $line, length($l)-length($postparen), $file, $l,
626 $line, length($1)+1, $file, $l,
633 $line, length($1)+1, $file, $l,
640 $line, length($1), $file, $l,
652 $line, length($m)+1, $file, $l,
664 $line, length($m)+1, $file, $l,
676 $line, length($m)+1, $file, $l,
683 $line, length($1)+1, $file, $l,
690 $line, length($1)+1, $file, $l,
696 $line, length($1)+1, $file, $l,
704 $line, length($1)+1, $file, $l,
711 $line, length($1)+1, $file, $l,
721 checkwarn("RETURNNOSPACE", $line, length($1)+6, $file, $l,
732 checkwarn("SIZEOFNOPAREN", $line, length($1)+6, $file, $l,
764 checkwarn("COMMANOSPACE", $line, length($pref)+1, $file, $l,
772 $line, length($1), $file, $l, "else after closing brace on same line");
777 $line, length($1)+1, $file, $l, "missing space after close paren");
782 $line, 0, $file, $l, "empty line before open brace");
788 $line, length($1), $file, $ol, "no space before semicolon");
794 $line, length($1), $file, $ol, "no space before colon of switch label");
799 $line, length($1), $file, $ol, "no space before label");
814 $line, length($1), $file, $ol,
824 $line, length($1), $file, $ol,
836 $line, length($1), $file, $ol,
848 $line, length($1), $file, $ol,
856 $line, length($1), $file, $ol,
865 $line, length($1), $file, $ol,
874 $line, length($1), $file, $ol, "badly placed open brace");
888 checkwarn("INDENTATION", $line, length($1), $file, $ol,
914 checkwarn("INDENTATION", $line, length($1), $file, $ol,
924 $line, length($1), $file, $ol,
930 $line, length($1)-1, $file, $ol,
942 $line, length($l)-1, $file, $ol,
950 $line, length($1)+1, $file, $ol,
956 $line, length($1)+1, $file, $ol,
963 $line, length($1)+1, $file, $ol,
969 $line, length($1)+1, $file, $ol,
976 $line, length($1)+1, $file, $ol,
983 $line, length($1)+1, $file, $ol,
989 $line, length($1)+1, $file, $ol,
999 $line, length($1)+1, $file, $ol,
1010 $line, length($1), $file, $ol,
1022 checkwarn("COPYRIGHT", 1, 0, $file, "", "Missing copyright statement", 1);
1048 if(`git status -s -- "$file"` =~ /^ [MARCU]/) {
1053 my $grl = `git rev-list --max-count=1 --min-parents=1 --timestamp HEAD -- "$file"`;
1063 $file, $copyright[0]{code},
1070 checkwarn("OPENCOMMENT", 1, 0, $file, "", "Missing closing comment", 1);
1073 checksrc_endoffile($file);