Lines Matching refs:l
372 my ($what, $line, $file, $l) = @_;
377 $line, length($what) + 11, $file, $l,
385 my ($cmd, $line, $file, $l) = @_;
410 $line, 0, $file, $l,
415 $line, 0, $file, $l,
421 $ignore_line[$line]=$l;
425 enable_warn($what, $line, $file, $l);
429 $line, 0, $file, $l,
447 my $l = "";
460 my $l = $_;
461 my $ol = $l; # keep the unmodified line for error reporting
465 if($l =~ /\!checksrc\! (.*)/) {
467 checksrc($cmd, $line, $file, $l)
470 if($l =~ /^#line (\d+) \"([^\"]*)\"/) {
478 if($l =~ /\* +copyright .* (\d\d\d\d|)/i) {
480 while($l =~ /([\d]{4})/g) {
484 col => index($l, $1),
485 code => $l
494 col => index($l, $1),
495 code => $l
501 if(length($l) > $max_column) {
502 checkwarn("LONGLINE", $line, length($l), $file, $l,
506 if($l =~ /^(.*)\t/) {
508 $line, length($1), $file, $l, "Contains TAB character", 1);
511 if($l =~ /^(.*)[ \t]+\z/) {
513 $line, length($1), $file, $l, "Trailing whitespace");
517 if($l =~ /^(.*)\/\*\w/) {
519 $line, length($1) + 2, $file, $l,
523 if($l =~ /^(.*)\w\*\//) {
525 $line, length($1) + 1, $file, $l,
529 if($l =~ /(.*)(FIXME|TODO)/) {
531 $line, length($1), $file, $l,
543 if($l =~ s/\/\*.*\*\// /g) {
546 if($l =~ s/\/\*.*//) {
552 if($l =~ s/.*\*\///) {
559 $l="";
578 if($l =~ /^(([^"\*]*)[^:"]|)\/\//) {
580 $line, length($1), $file, $l, "\/\/ comment");
583 if($l =~ /^(\#\s*include\s+)([\">].*[>}"])/) {
587 $line, length($1), $file, $l, "duplicated include");
589 $includes{$path} = $l;
593 if($l =~ /^[ \t]*\#/) {
599 my $nostr = nostrings($l);
620 checkwarn("SPACEBEFOREPAREN", $line, length($leading)+length($word), $file, $l,
629 $file, $l, "we prefer !variable instead of \"== NULL\" comparisons");
637 $file, $l, "we prefer if(rc) instead of \"rc != 0\" comparisons");
642 … checkwarn("DOBRACE", $line, length($1) + 2, $file, $l, "one space after do before brace");
646 … checkwarn("BRACEWHILE", $line, length($1) + 2, $file, $l, "one space between brace and while");
654 $line, $pos+1, $file, $l,
666 if($l =~ / *\#/) {
672 $line, length($l)-length($postparen), $file, $l,
677 if($l =~ /^(.*[a-z])\( /i) {
679 $line, length($1)+1, $file, $l,
686 $line, length($1)+1, $file, $l,
693 $line, length($1), $file, $l,
705 $line, length($m)+1, $file, $l,
717 $line, length($m)+1, $file, $l,
729 $line, length($m)+1, $file, $l,
736 $line, length($1)+1, $file, $l,
743 $line, length($1)+1, $file, $l,
749 $line, length($1)+1, $file, $l,
755 if($l =~ /(.*[^\) ]) \)/) {
757 $line, length($1)+1, $file, $l,
762 if($l =~ /(.*[^ ]) ,/) {
764 $line, length($1)+1, $file, $l,
769 if($l =~ /^(.*\W)return\(/) {
774 checkwarn("RETURNNOSPACE", $line, length($1)+6, $file, $l,
780 if($l =~ /^(.*\W)return \(\w*\);/) {
781 checkwarn("RETURNPAREN", $line, length($1)+7, $file, $l,
786 if(($l =~ /^(.*)sizeof *([ (])/) && ($2 ne "(")) {
791 checkwarn("SIZEOFNOPAREN", $line, length($1)+6, $file, $l,
797 if($l =~ /^(.*),[^ \n]/) {
823 checkwarn("COMMANOSPACE", $line, length($pref)+1, $file, $l,
829 if($l =~ /^(.*)\} *else/) {
831 $line, length($1), $file, $l, "else after closing brace on same line");
834 if($l =~ /^(.*)\)\{/) {
836 $line, length($1)+1, $file, $l, "missing space after close paren");
839 if(($l =~ /^\{/) && ($prevl =~ /^[ \t]*\z/)) {
841 $line, 0, $file, $l, "empty line before open brace");
845 if($l =~ /^(.*[^ ].*) ;$/) {
851 if($l =~ /^( *(case .+|default)) :/) {
856 if($prevl !~ /\?\z/ && $l =~ /^ +([A-Za-z_][A-Za-z0-9_]*):$/ && $1 ne 'default') {
862 my $bl = $l;
864 if(($l =~ /^(.*?\W)(\w+)(\s*\()/x) && $banfunc{$2}) {
874 $l =~ s/$prefix$bad$suff/$prefix$replace/;
877 $l = $bl; # restore to pre-bannedfunc content
882 if($l =~ /^([^\"-]*\W)(stderr)[^\"_]/x) {
893 if($l =~ /^(.*\W)fopen\s*\([^,]*, *\"([^"]*)/) {
904 if(($prevl =~ /\)\z/) && ($l =~ /^( +)\{/) && !$prevp) {
915 if($l =~ /^( *)[^ ]/) {
941 if($l =~ /^( *)[^ ]/) {
954 …if(($l =~ /(^.*(char|int|long|void|CURL|CURLM|CURLMsg|[cC]url_[A-Za-z_]+|struct [a-zA-Z_]+) *(\*+)…
960 …if(($l =~ /(^.*(char|int|long|void|curl_slist|CURL|CURLM|CURLMsg|curl_httppost|sockaddr_in|FILE)\*…
968 if($l =~ /^((\w).*)\{\z/) {
974 $line, length($l)-1, $file, $ol,
1028 if(($l eq $nostr) &&
1037 if($l =~ /^(^|.*\W)