Lines Matching refs:lines
1057 my @lines = split('\n', $text);
1059 foreach my $line (@lines) {
1171 my @lines = split("\n", $output);
1173 return ($id, $desc) if ($#lines < 0);
1175 if ($lines[0] =~ /^error: short SHA1 $commit is ambiguous/) {
1185 } elsif ($lines[0] =~ /^fatal: ambiguous argument '$commit': unknown revision or path not in the working tree\./ ||
1186 $lines[0] =~ /^fatal: bad object $commit/) {
1189 $id = substr($lines[0], 0, 12);
1190 $desc = substr($lines[0], 41);
1199 my @lines = ();
1220 my $lines = `${git_command} log --no-color --no-merges --pretty=format:'%H %s' $git_range`;
1221 foreach my $line (split(/\n/, $lines)) {
1277 @lines = ();
1633 last if (!defined $lines[$line]);
1634 next if ($lines[$line] =~ /^-/);
1637 $blk .= $lines[$line] . "\n";
1744 # Strip the diff line prefixes and rip blank lines at start and end.
1831 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1833 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1835 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1839 foreach my $c (split(//, $lines[$line])) {
2294 my @lines = split("\n", $output, -1);
2295 splice(@lines, 1, 1);
2296 $output = join("\n", @lines);
2342 my @lines = ();
2360 fixup_current_range(\$lines[$range_last_linenr], $delta_offset--, -1);
2364 push(@lines, ${$inserted}{'LINE'});
2367 fixup_current_range(\$lines[$range_last_linenr], $delta_offset++, 1);
2371 push(@lines, $line);
2378 return @lines;
2582 my $in_commit_log = 0; #Scanning lines before patch
2584 my $has_commit_log = 0; #Encountered lines before patch
2585 my $commit_log_lines = 0; #Number of commit log lines
2624 # Pre-scan the patch sanitizing the lines.
2694 # simplify matching -- only bother with positive lines.
2697 push(@lines, $line);
2718 foreach my $line (@lines) {
2763 # blank context lines so we need to count that too.
3105 if (!defined $lines[$linenr]) {
3167 # Check for lines starting with a #
3170 "Commit log lines starting with '#' are dropped by git as comments\n" . $herecurr) &&
3183 # A commit match can span multiple lines so this block attempts to find a
3184 # complete typical commit on a maximum of 3 lines
3221 last if ($#lines < $linenr + $n);
3402 # if it's a repeated word on consecutive lines in a comment block
3416 # ignore non-hunk lines and lines being removed
3464 for (; $cnt > 0 && defined $lines[$ln - 1]; $ln++) {
3465 $f = $lines[$ln - 1];
3466 $cnt-- if ($lines[$ln - 1] !~ /^-/);
3467 $is_end = $lines[$ln - 1] =~ /^\+/;
3472 if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
3474 } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {
3483 # This only checks context lines in the patch
3654 # There are a few types of lines that may extend beyond $max_line_length:
3656 # lines with a single string
3658 # lines with an RFC3986 like URL
3663 # LONG_LINE all other lines longer than $max_line_length
3679 # lines with only strings (w/ possible termination)
3716 # check for adding lines without a newline.
3717 if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
3857 # Block comments use * on subsequent lines
3864 "Block comments use * on subsequent lines\n" . $hereprev);
3867 # Block comments use */ on trailing lines
3900 # check for missing blank lines after struct/union declarations
3920 # check for multiple consecutive blank lines
3925 "Please don't use multiple blank lines\n" . $hereprev) &&
3933 # check for missing blank lines after declarations
3951 # other possible extensions of declaration lines
3969 # other possible extensions of declaration lines
4020 defined $lines[$linenr] &&
4021 $lines[$linenr] !~ /^[ \+]\t{$tabs,$tabs}return/)) {
4077 (!defined $lines[$realline_next - 1] ||
4078 substr($lines[$realline_next - 1], $off_next) =~ /^\s*$/)) {
4175 defined $lines[$ctx_ln - 1] &&
4176 $lines[$ctx_ln - 1] =~ /^-/)) {
4178 $ctx_skip-- if (!defined $lines[$ctx_ln - 1] || $lines[$ctx_ln - 1] !~ /^-/);
4183 #print "pre<$pre_ctx>\nline<$line>\nctx<$ctx>\nnext<$lines[$ctx_ln - 1]>\n";
4185 if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln - 1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
4192 defined $lines[$ctx_ln - 1])
4194 my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]);
4264 # 1) blank lines, they should be at 0,
4265 # 2) preprocessor lines, and
4281 # Check if either of these lines are modified, else
4304 # Track the 'values' across context and added lines.
4317 #ignore lines not being added
4331 # check for dereferences that span multiple lines
4442 #print "APW <$lines[$realline_next - 1]>\n";
4444 exists $lines[$realline_next - 1] &&
4446 ($lines[$realline_next - 1] =~ /EXPORT_SYMBOL.*\((.*)\)/)) {
4465 #print "FOO A<$lines[$realline_next - 1]> stat<$stat> name<$name>\n";
4474 #print "FOO B <$lines[$linenr - 1]>\n";
5275 ## # check for blank lines before declarations
5279 ## "No blank lines before declarations\n" . $hereprev);
5434 $lines[$linenr - 3] =~ /^[ +]/ &&
5435 $lines[$linenr - 3] !~ /^[ +]\s*$Ident\s*:/) {
5708 "Whitespace after \\ makes next lines useless\n" . $herecurr) &&
5751 #print "LINE<$lines[$ln-1]> len<" . length($lines[$ln-1]) . "\n";
5984 #print "APW: ALLOWED: lines block<$block>\n";
6033 #print "APW: ALLOWED: lines block<$block>\n";
6062 # check for unnecessary blank lines around braces
6065 "Blank lines aren't necessary before a close brace '}'\n" . $hereprev) &&
6072 "Blank lines aren't necessary after an open brace '{'\n" . $hereprev) &&
6085 # Check for user-visible strings broken across lines, which breaks the ability
6087 # newline (multiple lines in one string constant) or '\t', '\r', ';', or '{'
6093 "quoted string split across lines\n" . $hereprev) &&
6238 if ($lines[$linenr - 2] =~ /^\+(\t*)if\s*\(\s*$tested\s*\)\s*$/) {
6243 if ($lines[$linenr - 1] =~ /^\+(\t+)$func\s*\(\s*$tested\s*\)\s*;\s*$/) {
6265 my $testline = $lines[$linenr - 3];
6723 my $fmt = get_quoted_string($lines[$count - 1], raw_line($count, 0));
7468 "$cnt_lines lines checked\n";