-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a simplified machine parsable output for reuse lint
#925
Comments
+1 to this. I'd also suggest allowing us to pick from a few different output formats. And those output formats should be existing output formats. One of the output formats that's simplified and machine-parseable could be TAP format. Since TAP parsers abound, the direct output of Another format, which wouldn't be simplified and human-readable, but is widely used could be JUnit format, which also has a lot of parsers and could be consumed by CI/CD pipelines, including built-in reporting on sites like GitLab. |
Thanks for the issue. This seems quite doable to me. Off the top of my head, an implementation would need:
The TAP format looks decent to me as far as machine-readable specs go. A vague proposal:
The YAML is a bit verbose, but there's no other way to document why the test failed. Figuring out the value of |
I also had a look at reviewdog linked in the first comment. The README is very shouty/busy so I didn't make good progress skimming through it. Would the above work for reviewdog? |
To elaborate on the reviewdog example, here is suggested input for reviewdog in the video from the README: Details of accepting input formats and an example are described in the Input Format section.
The definitions are constructed according to the Vim errorformat. Another option for different uses might be the SARIF format. This, together with the JUnit.xml were already mentioned in an earlier issue: #320 |
One question is how to deal with global errors like missing licenses.
|
IMO, a missing license is a file-specific error. The license referenced by |
Adds an '-line' or '-l' option to the 'lint' command. Prints a line for each error, starting with the file to which the error belongs. This output can be a starting point for some parsers, in particular ones that implement something similar to Vim errorformat parsing. Related to #925 Additional work needed: - [ ] Needs tests - [ ] Error messages might have to be improved - [ ] Not all errors are found, as some issues aren't in the FileReports. This requires additional investigation. Signed-off-by: Nico Rikken <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Adds an '-line' or '-l' option to the 'lint' command. Prints a line for each error, starting with the file to which the error belongs. This output can be a starting point for some parsers, in particular ones that implement something similar to Vim errorformat parsing. Related to #925 Additional work needed: - [ ] Needs tests - [ ] Error messages might have to be improved - [ ] Not all errors are found, as some issues aren't in the FileReports. This requires additional investigation. Signed-off-by: Nico Rikken <[email protected]>
Adds an '-line' or '-l' option to the 'lint' command. Prints a line for each error, starting with the file to which the error belongs. This output can be a starting point for some parsers, in particular ones that implement something similar to Vim errorformat parsing. Related to #925 Additional work needed: - [ ] Needs tests - [ ] Error messages might have to be improved - [ ] Not all errors are found, as some issues aren't in the FileReports. This requires additional investigation. Signed-off-by: Nico Rikken <[email protected]>
A middle ground between the full JSON output and the human-focused plain output. My idea here is integrating
reuse lint
with tools like reviewdog where it excels with output along the lines of:One can generate such an output using the JSON version and processing it, but I think it would be beneficial to include it upstream.
The text was updated successfully, but these errors were encountered: