• Home
  • Raw
  • Download

Lines Matching refs:intra_line

731             my $intra_line = shift;
732 return "extra space".($intra_line =~ m/@\s\s/ ?
744 my ($head , $intra_line ) = split_line_head($_);
767 report(extra_SPC($intra_line)) if $intra_line =~ m/\s\s\S/ && eof
768 … && ! column_alignments_only($head , $intra_line , $contents_before_ ) ; # compare w/ $line_before
770 report(extra_SPC($intra_line)) if $intra_line =~ m/\s\s\S/;
773 $intra_line =~ s/^(include\s*)(".*?"|<.*?>)/$1/e if $head =~ m/#/;
775 if $intra_line =~ m/(\S)((<<|>>)=)/ # '<<=' or >>=' without preceding space
776 || ($intra_line =~ m/(\S)([\+\-\*\/\/%\&\|\^\!<>=]=)/
778 || ($intra_line =~ m/(\S)=/
780 && $intra_line =~ m/(\S)(=)/); # otherwise, '=' without preceding space
782 $intra_line =~ s/(<<|>>|[\+\-\*\/\/%\&\|\^\!<>=])=/=/g;
784 $intra_line =~ s/[A-Z_]+/int/g if $trailing_backslash;
786 $intra_line =~ s/(&&|\|\||<<|>>)/substr($1, 0, 1)/eg;
788 while ($intra_line =~ s/([\[\{\(])@+\s?/$1/e) {} # /g does not work here
790 while ($intra_line =~ s/\s?@+([,;\)\}\]])/$1/e) {} # /g does not work here
792 … $intra_line =~ s/@+/ /g; # note that extra SPC has already been handled above
793 $intra_line =~ s/\s+$//; # strip any (resulting) space at EOL
795 $intra_line =~ s/((^|\W)for\s*\()([^;]*?)(\s*)(;\s?);(\s*)([^;]*)(\))/
798 $intra_line =~ s/((^|\W)for\s*\()([^;]*(;[^;]*)?)(;\s?)(\))/
800 …$intra_line =~ s/(=\s*)\{ /"$1@ "/eg; # do not report {SPC in initializers such as ' = { 0,…
801 …$intra_line =~ s/, \};/, @;/g; # do not report SPC} in initializers such as ' = { 0,…
802 …report("space before '$1'") if $intra_line =~ m/[\w)\]]\s+(\+\+|--)/; # postfix ++/-- with preced…
803 …report("space after '$1'") if $intra_line =~ m/(\+\+|--)\s+[a-zA-Z_(]/; # prefix ++/-- with follo…
804 $intra_line =~ s/\.\.\./@/g; # blind '...'
805 …report("space before '$1'") if $intra_line =~ m/\s(\.|->)/; # '.' or '->' with precedin…
806 …report("space after '$1'") if $intra_line =~ m/(\.|->)\s/; # '.' or '->' with followin…
807 $intra_line =~ s/\-\>|\+\+|\-\-/@/g; # blind '->,', '++', and '--'
808 …report("space before '$1'") if $intra_line =~ m/[^:)]\s+(;)/; # space before ';' but not …
810 report("space before '$1'") if $intra_line =~ m/\s([,)\]])/; # space before ,)]
811 report("space after '$1'") if $intra_line =~ m/([(\[~!])\s/; # space after ([~!
812 … report("space after '$1'") if $intra_line =~ m/(defined)\s/; # space after 'defined'
813 …report("missing space before '$1'") if $intra_line =~ m/\S([|\/%<>^\?])/; # |/%<>^? without prec…
815 …report("missing space before binary '$2'") if $intra_line =~ m/([^\s{()\[e])([+\-])/; # '+'/'-' w…
817 …report("missing space before binary '$1'") if $intra_line =~ m/[^\s{()\[*!]([*])/; # '*' without …
818 …report("missing space before binary '$1'") if $intra_line =~ m/[^\s{()\[]([&])/; # '&' without p…
819 …report("missing space after ternary '$1'") if $intra_line =~ m/(:)[^\s\d]/; # ':' without followin…
820 …report("missing space after '$1'") if $intra_line =~ m/([,;=|\/%<>^\?])\S/; # ,;=|/%<>^? without…
821 …report("missing space after binary '$1'") if $intra_line=~m/[^{(\[]([*])[^\sa-zA-Z_(),*]/;# '*' w/…
823 …report("missing space after binary '$1'") if $intra_line=~m/([&])[^\sa-zA-Z_(]/; # '&' w/o follow…
825 …report("missing space after binary '$1'") if $intra_line=~m/[^{(\[]([+\-])[^\s\d(]/; # +/- w/o fo…
827 …report("missing space after '$2'") if $intra_line =~ m/(^|\W)(if|while|for|switch|case)[^\w\s]/;…
828 …report("missing space after '$2'") if $intra_line =~ m/(^|\W)(return)[^\w\s;]/; # return w/o SP…
830 … if $intra_line =~ m/(\w+)\s+\(/ # fn/macro name with space before '('
833 …report("missing space before '{'") if $intra_line =~ m/[^\s{(\[]\{/; # '{' without precedin…
834 …report("missing space after '}'") if $intra_line =~ m/\}[^\s,;\])}]/; # '}' without followin…