diff --git a/checkpatch.pl b/checkpatch.pl index d64a14a..f985446 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -2140,6 +2140,7 @@ sub process { my %commit_log_tags = (); my $has_changelog = 0; + my $warned_about_test_result_file = 0; my $has_doc = 0; my $has_test = 0; my $is_test = 0; @@ -2823,6 +2824,14 @@ sub process { "please, use spaces instead of tabs\n" . $herevet); } + if (!$warned_about_test_result_file && + $realfile =~ /^test\/.*\.result$/ && + $line =~ /^\+/) { + $warned_about_test_result_file = 1; + ERROR("TEST_RESULT_FILE", + "Please avoid tests with .result files\n"); + } + # check we are in a valid C source file if not then ignore this hunk next if ($realfile !~ /\.(h|c|cc)$/); diff --git a/doc/checkpatch.rst b/doc/checkpatch.rst index 546aa86..56f00d2 100644 --- a/doc/checkpatch.rst +++ b/doc/checkpatch.rst @@ -774,6 +774,11 @@ Others **PRINTF_0XDECIMAL** Prefixing 0x with decimal output is defective and should be corrected. + **TEST_RESULT_FILE** + For regression tests, there are .result files. Tests with .result files + should be avoided. It is recommended to use Luatest or TAP for Tarantool + regression tests. + **TYPO_SPELLING** Some words may have been misspelled. Consider reviewing them.