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 setting to change how severities are displayed #141

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

Discookie
Copy link
Collaborator

Fixes #139. Requires #140 for CI passing.

By default, all CodeChecker bug severities except STYLE are displayed as errors inside the editor. This PR adds a setting to enable changing how each of these severities are displayed.

@@ -158,6 +158,14 @@
"description": "Enable CodeLens for displaying the reproduction path",
"default": true
},
"codechecker.editor.customBugSeverities": {
Copy link
Collaborator

@MiklosMagyari MiklosMagyari Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be more user friendly to use an enum setting:

"codechecker.editor.customBugSeverities": {
      "type": "string",
      "default": "Error",
      "enum": [
        "Error",
        "Warning",
        "Information",
        "Hint"
      ],
      "description": "Control how a bug is displayed in the editor, depending on what its severity is. Bugs can be displayed as 'Error', 'Warning', 'Information' or 'Hint'. By default, everything except 'STYLE' severity is displayed as an error."
    }

so this setting would be a selection:

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, and turns out vscode supports enum selection within objects, which is nice to use.
Can't rename the column headers, but it doesn't really matter too much.

image

Copy link
Collaborator

@MiklosMagyari MiklosMagyari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Tested and works correctly.

@Discookie
Copy link
Collaborator Author

@MiklosMagyari Thanks! We added you as a maintainer so you can now theoretically approve PRs as well - that's required for merging here.

Copy link
Collaborator

@vodorok vodorok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@vodorok vodorok merged commit df64735 into Ericsson:main Jul 5, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

Support more VSCode diagnostic severities
3 participants