[apex] New Rule: Queueable Should Attach Finalizer#5303
Conversation
adangel
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I think, the rule documentation should be improved a bit. I'm suggesting a slightly different (more neutral) name. We have also some more guidelines documented at https://docs.pmd-code.org/latest/pmd_devdocs_major_rule_guidelines.html
The goal is, that the rules are easily understandable, what they detect, why they detect it, and what the alternative ("correct") code would be...
- Renames the rule to `QueueableWithoutFinalizer` to be more neutral. - Provides a more robust description. - Provides a more succinct error message. - Provides a positive sample for the documentation .
Implements the [`RuleChain`](https://docs.pmd-code.org/latest/pmd_userdocs_extending_writing_java_rules.html#economic-traversal-the-rulechain) to traverse all classes within the file.
adangel
left a comment
There was a problem hiding this comment.
Thanks for the update!
However, this is not ready yet: There are some PMD violations, you need to fix first. And then, we'll probably see checkstyle errors (we use 4 space indentation, etc. - just run ./mvnw verify before commit.... see also https://github.com/pmd/pmd/wiki/Setup-IDE)
b1d46b5 to
1ee0f53
Compare
|
@all-contributors please add @mitchspano for code |
|
@adangel Thank you for your guidance here. I have resolved all PMD and checkstyle issues. |
Generated by 🚫 Danger |
Merge pull request #5303 from mitchspano:Require_Finalizer
Describe the PR
Warns the author of Apex whenever they write a class which implements the
Queueableinterface and do not attach aFinalizer.Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)