Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
SA3LI Trial
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3GPP
SA3LI Trial
Commits
24804524
Commit
24804524
authored
Apr 06, 2020
by
canterburym
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds linting exceptions
parent
5e3a533d
Pipeline
#3215
passed with stage
in 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
lint_asn1.py
testing/lint_asn1.py
+12
-4
lintingexceptions.py
testing/lintingexceptions.py
+1
-0
No files found.
testing/lint_asn1.py
View file @
24804524
...
...
@@ -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
:
for
filename
,
results
in
result
.
items
():
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
)
testing/lintingexceptions.py
0 → 100644
View file @
24804524
exceptedStrings
=
[
"D.4.4: Enumerations for UDMServingSystemMethod start at 0, not 1"
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment