diff --git a/addons/cert.py b/addons/cert.py index d3573afa3..af3615860 100755 --- a/addons/cert.py +++ b/addons/cert.py @@ -160,7 +160,7 @@ def exp42(data): def exp15(data): for scope in data.scopes: if scope.type in ('If', 'For', 'While'): - token = scope.bodyStart.next + token = scope.bodyStart.next if token.str==';' and token.linenr==scope.bodyStart.linenr: reportError(token, 'style', 'Do not place a semicolon on the same line as an IF, FOR or WHILE', 'EXP15-C') @@ -232,7 +232,7 @@ def int31(data, platform): 'style', 'Ensure that integer conversions do not result in lost or misinterpreted data (casting ' + str(value.intvalue) + ' to ' + destType + ')', 'INT31-c') - break + break # MSC24-C # Do not use deprecated or obsolescent functions def msc24(data): @@ -321,7 +321,7 @@ def str11(data): if not parent.isAssignmentOp: continue - + varToken = parentOp1.astOperand1 if varToken is None or not varToken.isName: continue @@ -332,7 +332,7 @@ def str11(data): valueToken = parentOp1.astOperand2 if valueToken is None: continue - + if valueToken.isNumber and int(valueToken.str)==strlen: reportError(valueToken, 'style', 'Do not specify the bound of a character array initialized with a string literal', 'STR11-C') diff --git a/pylintrc_travis b/pylintrc_travis index adcbdb8ed..2e6aa4ec6 100644 --- a/pylintrc_travis +++ b/pylintrc_travis @@ -1,6 +1,11 @@ -# Just the severe stuff... [MESSAGES CONTROL] disable=C,R,W +enable=mixed-indentation, + trailing-whitespace, + print-statement, + literal-comparison, + #unnecessary-semicolon, + #bad-indentation [REPORTS] reports=no [TYPECHECK] @@ -8,3 +13,4 @@ reports=no ignored-classes=SQLObject,_socketobject [MASTER] init-hook='import sys; sys.path.append("./addons")' +suggestion-mode=yes diff --git a/tools/test-my-pr.py b/tools/test-my-pr.py index 3d2988383..cc72bed19 100755 --- a/tools/test-my-pr.py +++ b/tools/test-my-pr.py @@ -119,7 +119,7 @@ if __name__ == "__main__": else: who = 'Your' crashes.append(package + ' ' + who) - + with open(result_file, 'a') as myfile: myfile.write(package + '\n') diff = lib.diff_results(work_path, 'master', results_to_diff[0], 'your', results_to_diff[1])