File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2141,6 +2141,7 @@ sub process {
21412141 my %commit_log_tags = ();
21422142 my $has_changelog = 0;
21432143 my $warned_about_test_result_file = 0;
2144+ my $new_file = 0;
21442145 my $has_doc = 0;
21452146 my $has_test = 0;
21462147 my $is_test = 0;
@@ -2303,6 +2304,11 @@ sub process {
23032304 $in_commit_log = 0;
23042305 next
23052306 }
2307+
2308+ if ($line =~ / ^new (file )?/ ) {
2309+ $new_file = 1;
2310+ }
2311+
23062312 if ($line =~ / ^new (file )?mode 0?120/ ||
23072313 $line =~ / ^index [0-9a-f]+..[0-9a-f]+ 0?120/ ) {
23082314 $is_symlink = 1;
@@ -2826,10 +2832,10 @@ sub process {
28262832
28272833 if (!$warned_about_test_result_file &&
28282834 $realfile =~ / ^test\/ .*\. result$ / &&
2829- $line =~ / ^ \+ / ) {
2835+ $new_file ) {
28302836 $warned_about_test_result_file = 1;
28312837 ERROR(" TEST_RESULT_FILE" ,
2832- " Please avoid tests with .result files\n " );
2838+ " Please avoid new tests with .result files\n " );
28332839 }
28342840
28352841# check we are in a valid C source file if not then ignore this hunk
You can’t perform that action at this time.
0 commit comments