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

Include more checks to be patched #751

Merged
merged 3 commits into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-751.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: improvement
improvement:
description: Apply the suggested fixes for `MutableConstantField`, `UnusedMethod`, and `UnusedVariable`.
links:
- https://github.com/palantir/gradle-baseline/pull/751
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public class BaselineErrorProneExtension {

// Built-in checks
"ArrayEquals",
"MissingOverride");
"MissingOverride",
"MutableConstantField",
Copy link
Contributor

@iamdanfox iamdanfox Aug 13, 2019

Choose a reason for hiding this comment

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

Annoyingly the auto-fix for this actually results in quite a lot of lines going over the 120 char limit we have...

Given that this means more manual actions to merge one of these PRs (and might block baseline upgrades), could we actually just drop this one for now and keep the others?

I tried it out locally by adding:

    plugins.withId('com.palantir.baseline-error-prone') {
        plugins.withId('java') {
            baselineErrorProne {
                patchChecks.add('MutableConstantField')
            }
        }
    }

And then running ./gradlew classes -PerrorProneApply

"UnusedMethod",
"UnusedVariable");

private final ListProperty<String> patchChecks;

Expand Down