Can I suppress an entire file #598
Answered
by
priv-kweihmann
priv-kweihmann
asked this question in
Q&A
-
Q: I have an include file that has issues that I can't fix (e.g. auto generated file). How can I suppress the entire file from the results? |
Beta Was this translation helpful? Give feedback.
Answered by
priv-kweihmann
Jul 6, 2024
Replies: 1 comment
-
Short answer: You can't. You can, but it requires a bit of extra work.
import sys
from oelint_adv.core import create_lib_arguments, run
suppress_files = [
'foo.inc'
]
results = run(create_lib_arguments(sys.argv))
issues = [x[1] for x in results]
filtered = [x for x in issues if not any(y in x for y in suppress_files)]
print('\n'.join(filtered))
sys.exit(len(results) if results else 0)
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
priv-kweihmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short answer: You can't.
Long Answer:
You can, but it requires a bit of extra work.
The following options exist:
grep -v
inverted regex search