[Feature request] Support stand-alone support for linter for use in CI environment
awmoore-intel opened this issue · 4 comments
Request for enhancement where the linter can be run via a command-line taking in the set of rules, returning the violations, and using an exit code to indicate compliance.
This would be useful in a CI-like environment where code is checked before it's merged.
#10 is a requirement for this feature request.
CLI mode is already possible, but we want to scope it to work properly with single files.
It might be good to define what exit codes you expect for this case.
Suppress triggering device analyses and resolving imported files for single file CLI mode #34 is now merged and enables the use of the dfa minimal CLI client to be used on single files and closes #10
#10 is a requirement for this feature request.
CLI mode is already possible, but we want to scope it to work properly with single files. It might be good to define what exit codes you expect for this case.related: #58
This is now fixed, so rudimentary pass/fail checks can be done via examining the exit code.
Beyond that, what is needed? The opening of this speaks mostly on the linter, but not to specifically what features are wished for (beyond the exit code).
I could imagine you'd want to be able to output violations to either a file or stdout in some less-human-readable format, for example as a json structure or similar (and there is no reason that could not be expanded to also apply to regular diagnostics).
But I would also like you to expand more specifically on what is, if anything, is needed beyond the pass/fail exit code.