File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2141,6 +2141,7 @@ sub process {
2141
2141
my %commit_log_tags = ();
2142
2142
my $has_changelog = 0;
2143
2143
my $warned_about_test_result_file = 0;
2144
+ my $new_result_file = 0;
2144
2145
my $has_doc = 0;
2145
2146
my $has_test = 0;
2146
2147
my $is_test = 0;
@@ -2303,6 +2304,11 @@ sub process {
2303
2304
$in_commit_log = 0;
2304
2305
next
2305
2306
}
2307
+
2308
+ if ($line =~ / ^new (file )?mode 100644/ ) {
2309
+ $new_result_file = 1;
2310
+ }
2311
+
2306
2312
if ($line =~ / ^new (file )?mode 0?120/ ||
2307
2313
$line =~ / ^index [0-9a-f]+..[0-9a-f]+ 0?120/ ) {
2308
2314
$is_symlink = 1;
@@ -2826,10 +2832,10 @@ sub process {
2826
2832
2827
2833
if (!$warned_about_test_result_file &&
2828
2834
$realfile =~ / ^test\/ .*\. result$ / &&
2829
- $line =~ / ^ \+ / ) {
2835
+ $new_result_file ) {
2830
2836
$warned_about_test_result_file = 1;
2831
2837
ERROR(" TEST_RESULT_FILE" ,
2832
- " Please avoid tests with .result files\n " );
2838
+ " Please avoid new tests with .result files\n " );
2833
2839
}
2834
2840
2835
2841
# 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