Skip to content

CHANGE (PMD) @W-18408712@ Custom PMD severities now handled properly #291

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

Merged
merged 2 commits into from
May 13, 2025

Conversation

jfeingold35
Copy link
Contributor

This PR does the following:

  • If a PMD rule is referenced in a custom ruleset, then it uses the severity that PMD reports that it has, instead of our hardcoded severity levels.

<priority>1</priority> <!-- Default severity is 5 (low), interpreted as 4 (low). But our hardcoded mapping replaces it with 3 (moderate). We re-override it here with 1 (high), interpreted as 2 (high). -->
</rule>

<rule ref="category/apex/codestyle.xml/OneDeclarationPerLine"/> <!-- This rule's default severity is 1 (high) which we interpret as 2 (high). But our hardcoded mapping replaces it with 3 (moderate). We're not touching it here, so 3 should stay used. -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this comment correct? I thought we would keep it as 2 (high) here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Thanks.

@jfeingold35 jfeingold35 merged commit c292ec4 into dev May 13, 2025
7 checks passed
@stephen-carter-at-sf stephen-carter-at-sf deleted the d/W-18408712 branch May 14, 2025 19:53
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.

2 participants