From ba1f17866ad575e29cfbdd25def136d8461ed1c6 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Thu, 6 Apr 2017 13:20:26 +0900 Subject: [PATCH] RULE: fix: allow %ifarch/%endif 1. Allow %ifarch/%endif in %files section 2. Make a more clear error message for RULE 5-3. Change-Id: I2f04234c8b01dd6d718ceece94643ee085081131 Signed-off-by: MyungJoo Ham --- rule_checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule_checker.py b/rule_checker.py index e587cfa..d01eff6 100755 --- a/rule_checker.py +++ b/rule_checker.py @@ -97,9 +97,9 @@ def ruleCheckInc(file): files = 0 else: if re.search(r'^\s*[^#\s]+', line) and \ - not re.search(r'^\s*%include', line): + not re.search(r'^\s*(%include)|(%endif)|(%ifarch)', line): error += 1 - print("ERROR: RULE 5.3 a block must not have a file included") + print("ERROR: RULE 5.3 a block must not have a file included (%files section must be empty)") report(file, lc, line) continue -- 2.34.1