Skip to content

Public Feedback: Default Ruleset updates #138

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

Closed
ChuckJonas opened this issue Aug 24, 2023 · 3 comments
Closed

Public Feedback: Default Ruleset updates #138

ChuckJonas opened this issue Aug 24, 2023 · 3 comments

Comments

@ChuckJonas
Copy link
Owner

ChuckJonas commented Aug 24, 2023

Looking for input on updates to the default ruleset. This potentially impacts a lot of users (anyone who doesn't override it), so I want to have community consensus:

https://github.com/ChuckJonas/vscode-apex-pmd/blob/master/rulesets/apex_ruleset.xml

  • Are there any rules that are missing?
  • Are there any rules that should be removed?
  • Any changes to priority?

Related PR:

@tomekduda
Copy link

My PR #113 was declined but in #112 I listed 1 more deprecated rule: VariableNamingConventions
Consider removing it? https://docs.pmd-code.org/pmd-doc-6.22.0/pmd_rules_apex_codestyle.html#variablenamingconventions and close my ticket?

And (shameless plug) there's a rule I'm using for scanning flows for SOQL/DML in a loop. It's very slow, I made it into a separate ruleset, I wouldn't add it to default without some clever improvements... but have a look? pmd/pmd#3413 (comment)
I know there's https://github.com/Force-Config-Control/lightning-flow-scanner-vsce but I don't see it handling SOQL Get Records and calling actions in a loop

@ChuckJonas
Copy link
Owner Author

ChuckJonas commented Aug 26, 2023

@tomekduda I actually did not mean to close #113. Sorry. I must have checked it when I was cleaning out dependabot PR's. Thank you for bringing that to my attention.

This does have a significant impact on user experience, so I'd like to come to some sort of community consensus.

And (shameless plug) there's a rule I'm using for scanning flows for SOQL/DML in a loop

That sounds like a great rule to have on hand for CI/CD or during an audit. It would be cool to build a collection of these types of custom rules from the community. If we add them rulesetsfolder I think you could reference them in the config, or we could easily add a command to "Select a ruleset to run".

If you want to share it, please submit a PR!

@ChuckJonas
Copy link
Owner Author

ChuckJonas commented Aug 26, 2023

@tomekduda I was over thinking this. We should just go with the quick-start ruleset from PMD like you did in your #113 PR.

I reopened it, but we should update it with the latest from PMD before we merge it.

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

2 participants