Commit 24804524 authored by canterburym's avatar canterburym
Browse files

Adds linting exceptions

parent 5e3a533d
Loading
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
exceptedStrings = ["D.4.4: Enumerations for UDMServingSystemMethod start at 0, not 1"]
 No newline at end of file