Commit 24804524 authored by canterburym's avatar canterburym

Adds linting exceptions

parent 5e3a533d
Pipeline #3215 passed with stage
in 15 seconds
......@@ -8,6 +8,8 @@ import string
from pprint import pprint
import functools
import lintingexceptions
moduleLevelTests = []
typeLevelTests = []
......@@ -210,14 +212,20 @@ def lintAllASN1FilesInPath (path):
if __name__ == '__main__':
result = lintAllASN1FilesInPath("./")
totalErrors = 0
totalSuppressed = 0
print ("Drafting rule checks:")
print ("-----------------------------")
for filename, results in result.items():
print ("{0}: {1}".format(filename, "OK" if len(results) == 0 else "{0} errors detected".format(len(results))))
for error in results:
errors = [r for r in results if not (formatFailure(r) in lintingexceptions.exceptedStrings)]
suppressedErrors = [r for r in results if formatFailure(r) in lintingexceptions.exceptedStrings]
print (f"{filename}: {'OK' if len(errors) == 0 else f'{len(errors)} errors detected'}")
for error in errors:
print(" " + formatFailure(error))
for error in suppressedErrors:
print(" (" + formatFailure(error) + " - suppressed)")
totalErrors += len(results)
totalSuppressed += len(suppressedErrors)
print ("-----------------------------")
print ("{0} non-compliances detected".format(totalErrors))
print (f"{totalErrors} non-compliances detected, {totalSuppressed} errors suppressed")
exit(totalErrors)
exceptedStrings = ["D.4.4: Enumerations for UDMServingSystemMethod start at 0, not 1"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment