changeset 30245:01703a8b8a46 stable

check-code: discard filtering result of previous check for independence Before this patch, check-code.py applies filtering on the file content, to which filtering of previous check is already applied. This might hide issues, which should be detected by a subsequent check in "checks" list. Fortunately, this problem hasn't appeared, because there is no overlapping of filename matching (examined in the order below). 1. *.py or *.cgi 2. test-* (not *.t suffix) 3. *.c or *.h 4. *.t 5. *.txt 6. *.tmpl For example, adding a test, which wants to examine raw comment text in *.py files, at the end of current "checks" list doesn't work as expected, because a filter for *.py files normalizes comment text in them. Putting such test at the beginning of "checks" list also resolves this problem, but such dependence on the order decreases maintainability of check-code.py itself. This patch discards filtering result of previous check at the beginning of each checks, for independence of each checks.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 01 Nov 2016 20:39:36 +0900
parents 4e934804cafe
children b4c0f8d5edd2
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Nov 01 20:39:36 2016 +0900
+++ b/contrib/check-code.py	Tue Nov 01 20:39:36 2016 +0900
@@ -537,6 +537,7 @@
         return result
 
     for name, match, magic, filters, pats in checks:
+        post = pre # discard filtering result of previous check
         if debug:
             print(name, f)
         fc = 0