- Notifications
You must be signed in to change notification settings - Fork898
feat: AddRemoveUnusedDeclarations
#1263
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View thisfailed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
6e0d142
to304839c
CompareReplaceObsoletesStep
RemoveUnusedDeclarations
3e2ecb4
to83b6daa
Comparegoogle seems dead. |
@Pankraz76, for future reference, Google employees can't even look at your PR until youaccept the CLA. |
its signed:
AgreementNameDate SignedManage |
as every tweak encountered here is fixed in palantir, consider google dead and will drop accordingly: |
83b6daa
to6dfcb65
Compare
feat: Add
RemoveUnusedDeclarations
formatting ruleThis PR introduces a new Java formatting rule that automatically removes redundant modifiers and declarations that are either:
Motivation
During codebase modernization efforts (#2524), we identified recurring patterns where:
public
in interfaces)final static
instead ofstatic final
)As highlighted inthis comment, such redundancies:
Key Features
The rule handles:
Interface members:
public
,static
,final
,abstract
modifierspublic static final int CONST
→int CONST
Nested types:
public static class Inner
→static class Inner
Enum declarations:
public static final VALUE
→VALUE
Modern Java features:
public final
params → implicit)Annotation declarations:
@interface
formatting)Benefits
Reduced Noise:
Maintenance Efficiency:
Modern Java Support:
Non-intrusive:
Implementation Notes
private
when meaningful)@Nullable final
parametersIntegration
Works seamlessly with: