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

Enable SimplifyBooleanReturn #9885

Merged
merged 5 commits into from
May 15, 2023
Merged

Enable SimplifyBooleanReturn #9885

merged 5 commits into from
May 15, 2023

Conversation

koppor
Copy link
Member

@koppor koppor commented May 14, 2023

This enables https://docs.openrewrite.org/recipes/java/cleanup/simplifybooleanreturn

Compulsory checks

Preview Give feedback

@koppor koppor added the type: code-quality Issues related to code or architecture decisions label May 14, 2023
@Siedlerchr
Copy link
Member

seems like something with the braces formatter went wrong

@koppor
Copy link
Member Author

koppor commented May 14, 2023

Or @koppors manual changes.

@Siedlerchr
Copy link
Member

These recipes would make results to src/main/java/org/jabref/gui/openoffice/ManageCitationsDialogView.java:
org.jabref.config.rewrite.cleanup
org.openrewrite.java.cleanup.UnnecessaryParentheses
Report available:
/home/runner/work/jabref/jabref/build/reports/rewrite/rewrite.patch
Run 'gradle rewriteRun' to apply the recipes.

@Siedlerchr
Copy link
Member

I think the braces can be removed completly

} else {
return true;
}
return !(CONJUNCTIONS.contains(word));
Copy link
Member

Choose a reason for hiding this comment

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

no braces necessary

return false;
}
return true;
return (viewModel != null) && (!viewModel.failedToGetCitationEntries);
Copy link
Member

Choose a reason for hiding this comment

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

at least the brace after the && are uncessary

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's see what checkstyle says... I think, it demands some braces?

Copy link
Member

Choose a reason for hiding this comment

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

I think only in if conditions

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants