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

[FEATURE] Make commonly flagged syntax rules enforceable by spotless #1203

Open
martin-gaievski opened this issue Feb 27, 2025 · 1 comment

Comments

@martin-gaievski
Copy link
Member

We can automate enforcement for some of the syntax rules by using spotless plugin. This should save time for PR reviews and improve the code in general.

For now I can see one such rule:

  • negative boolean expressions should use the form foo == false instead of !foo. This is from core guidelines
@martin-gaievski
Copy link
Member Author

I can think of few other rules that routinely pop up during the PR review:

  • user String.format(Locale, "your message %s", param) instead of direct concat of strings "your message" + param.toString()
  • set method parameters in public methods final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant