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

Add reportingConfiguration.kind #467

Open
ghost opened this issue Jul 27, 2020 · 1 comment
Open

Add reportingConfiguration.kind #467

ghost opened this issue Jul 27, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 27, 2020

Some analysis tools have rules that detect desirable conditions in the code rather than defects. Results from such rules are marked with "kind": "pass", for example:

{ # A result object.
  "ruleId": "CS1001",
  "kind": "pass",
  "message": {
    ...
  }
}

But there is no way to declare such a rule in the rule metadata, because the reportingConfiguration object does not have a kind property:

{
  "tool": {
    "driver": {
      "name": "CodeScanner",
      "rules": [
        {
          "id": "CS1001",
          "defaultConfiguration": {
            "kind": "pass"                 # Illegal: no such property
          },
          ...
        },
        ...
      ]

So, for example, if a tool has a command line option to --dump-rules, there will be no way to identify in the output those rules that detect desirable conditions.

Consider adding a property reportingConfiguration.kind. reportingConfiguration's kind and level properties should have the same mutual defaulting behavior as they do in the result object (if level is any of "error", "warning", or "note", then kind defaults to "fail"; if kind is anything except "fail", then level defaults to "none").

@schlaman-ms
Copy link

schlaman-ms commented Aug 9, 2023

Document location for issue:

§3.50 reportingConfiguration object
§3.50.6 kind property (proposed)

lgolding:

"Some analysis tools have rules that detect desirable conditions in the code rather than defects... But there is no way to declare such a rule in the rule metadata, because the reportingConfiguration object does not have a kind property"

Propose new kind property

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

No branches or pull requests

2 participants