Skip to content

SARIF: parse and populate ruleId  #142

@alexeagle

Description

@alexeagle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions