Skip to content

Remove PMD rule SimplifyBooleanReturns #481

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 1 commit into from
Jan 26, 2025

Conversation

holgerfriedrich
Copy link
Member

Remove SimplifyBooleanReturns from default rule set.
Readability of code tends to be better if this rule is not enforced.

It can be re-activated on project basis by using a custom ruleset, see configuration parameter pmdRuleset and supply an adapted rule set similar to rules.xml from this repo.

This is basically my conclusion from openhab/openhab-core#4555 and #4567.
See the code changes proposed in #4555 to get an impression of the readability of code compliant to this rule.

Remove from default rule set.
Readability of code tends to be better if this rule is not enforced.

It can be re-activated on project basis by using a custom ruleset,
see configuration parameter pmdRuleset and supply an adapted rule
set similar to rules.xml from this repo.

Signed-off-by: Holger Friedrich <[email protected]>
@holgerfriedrich holgerfriedrich requested a review from a team as a code owner January 19, 2025 15:14
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

I agree, enforcing this rule decreases readability.

@kaikreuzer kaikreuzer merged commit a14277b into openhab:main Jan 26, 2025
2 checks passed
@kaikreuzer kaikreuzer added this to the 0.18.0 milestone Jan 26, 2025
@holgerfriedrich holgerfriedrich deleted the pr-remove-simplify-returns branch January 26, 2025 13:58
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