Skip to content
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

SARIF: parse and populate ruleId #142

Open
alexeagle opened this issue Feb 16, 2024 · 1 comment
Open

SARIF: parse and populate ruleId #142

alexeagle opened this issue Feb 16, 2024 · 1 comment

Comments

@alexeagle
Copy link

I run a linter that produces a report file containing

docs/platform/training/index.md:32:73:Google.We:Try to avoid using first-person plural like 'we'.

The Google:We is the identifier for which lint rule was violated.

The underlying quickfix implementation in vim only supports:

        %n              error number (finds a number)
        %m              error message (finds a string)

but many tools produce an error code like that which is alphanumeric and can't be parsed with %n.

In the SARIF output I'd like to use ruleId to capture this field, so the message doesn't get the code jammed in it.

https://github.com/microsoft/sarif-tutorials/blob/main/docs/3-Beyond-basics.md#related-locations
shows a sample of how this may be reported.

@alexeagle
Copy link
Author

As another way to describe the issue, https://github.com/reviewdog/errorformat/blob/master/fmts/testdata/ansible-lint.ok has [E201] Trailing whitespace as the message, but I think E201 should have been parseable as a code and the message only read Trailing whitespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant