Skip to content

consider convention principle for disableAllWarnings=true #5367

Open

Description

@Pankraz76

Considering:

it feels overwhelming and impractical to require explicitly setting disableAllWarnings=true.
This should actually be part of a convention-based default to avoid unpleasant situations like the one recently discovered in Spotless.

In fact, this should be the default, because:

  • Having thousands of warnings simply does not scale on a human level.
  • It is unrealistic to expect developers to spend time dealing with such a volume of noise.
    Most won’t have the time—or the motivation—to address it. Instead, the logs get flooded, attention gets diluted, and the natural reaction is to ignore the warnings entirely.
  • Endless, repeating warnings create alert fatigue. The more noise a tool produces, the less likely real issues will ever be noticed.
  • Warnings should be actionable by default.
    If they aren’t, developers shouldn’t have to manually opt out. Tools should provide clean, helpful feedback out of the box.
  • A tool that produces more noise than value becomes counterproductive.
    Reducing irrelevant output is essential to maintaining a healthy signal-to-noise ratio.

From this perspective, having disableAllWarnings=true as the default would establish a more sensible, error-focused baseline.
Developers could then intentionally opt in to warnings when they want to focus on quality checks or refactoring, instead of being overwhelmed by default.

Activity

  1. changed the title [-]consider opt in for `disableAllWarnings=true`[/-] [+]consider convention principle for `disableAllWarnings=true`[/+] on Nov 23, 2025
  2. cushon commented on Dec 5, 2025

    @cushon
    Collaborator

    I think I mostly agree with this. Internally at Google we only enable ERROR level checks at build-time, because warnings make the build log verbose and people tend to ignore them. Instead, we surface WARNING level checks at code review time.

    In theory we could have something similar with a GitHub PR bot to show warning level checks.

    I think we should consider changing the defaults (#5387 is related for SUGGESTION level checks), but I would also like to try to get more feedback from the community on preferences here, since we've had these defaults for a while and people may be relying on them.

    it feels overwhelming and impractical to require explicitly setting disableAllWarnings=true

    As long as we have the current defaults, do you have suggestions on ways we could make the configuration easier to use? It seems like we do support the configuration you want and there is documentation for it, where there challenges you encountered trying to use the disableAllWarnings configuration?

  3. commonquail commented on Dec 31, 2025

    @commonquail
    Contributor

    [...] unpleasant situations like the one recently discovered in Spotless.

    I am merely a bystander. However, I know that Spotless has built-in support for ratcheting in some places, so at a project level must understand that it may not be viable to fix every lint finding at once. That issue makes it seem like Error Prone was enabled uncritically and then only (superficially) reviewed when somebody finally encountered build breakage. That experience seems much less about the default behaviour of warnings and much more about how to adopt a new linter in the general case. In particular, I do not agree with the observation that -XepDisableAllWarnings is required, nor with the implication that Error Prone's warnings fall short of being actionable—and I enable a large majority of checks, including experimental ones, of all severities.

    more feedback from the community on preferences here

    Warnings off by default sounds like the correct default for Google. I want warnings on, but adapting is trivial for me.

    Somebody upgrading blindly would not notice this change. I can imagine at least one way to ensure they would, if that were Very Important. Personally, I might be inclined to suggest that blindly upgrading is an unsupported use case.

    I use warnings because I already rely on contextual <failOnWarning> to keep violations out of the source tree. This enables a less restrictive developer experience that still protects against silly missteps like default locale reliance. If for some reason I could not have <failOnWarning> it is more likely that I would instead promote all Error Prone checks to ERROR (I have sometimes thought about doing so anyway because the contextual <failOnWarning> is very difficult for some users to reason about).

    In theory we could have something similar with a GitHub PR bot to show warning level checks.

    Such an integration could be sufficient for me, and I would experiment with it if it existed. A PR bot might be able to learn to annotate the review inline, like in Critique, and that's a very interesting proposition.

    But build logs don't get read and I don't have access to -2's or readability, so anything less than forcefully obstructing a merge will see violations steamrolled into mainline. Breaking the build is simplistic and inelegant but extremely effective and with minimal implementation and support cost.


    In retrospect, the biggest integration difficulty I've had was in realizing I just want all checks enabled, including experimental ones, except for those that rely on specific APIs that I don't use. Namely, I had to figure out that I want to run with -XepAllDisabledChecksAsWarnings—not because of the quality of documentation so much as because I needed practical experience to understand the impact. Hypothetically, I do believe it is possible to restructure https://errorprone.info/bugpatterns to better support that step, but my thoughts on that are superficial and disjointed and it is not likely a trivial task at any rate.

  4. Pankraz76 commented on Dec 31, 2025

    @Pankraz76
    Author

    Warnings off by default sounds like the correct default for Google. I want warnings on, but adapting is trivial for me.

    Definitely agree.

    It’s nice to have warnings out of the box. Still, the reality is that these warnings often never get addressed and therefore constantly spam the logs. Even if we want to solve the issues, in our spotless case this resulted in around 8k warnings.

    How is someone supposed to handle such a workload?

    Printing the same warning over and over again makes no sense. Even though I agree that warnings should exist out of the box, endlessly repeating them just creates noise.

    Ideally, Error Prone would know which warnings have already been reported and skip them. Of course, that’s tricky and probably not very practical to implement.

    Because of that, treating warnings as opt-in seems more reasonable. This would allow developers to focus on details when it’s possible and explicitly requested, instead of being overwhelmed by warnings upfront, as is currently the case.

  5. Stephan202 commented on Dec 31, 2025

    @Stephan202
    Contributor

    In theory we could have something similar with a GitHub PR bot to show warning level checks.

    Such an integration could be sufficient for me, and I would experiment with it if it existed. A PR bot might be able to learn to annotate the review inline, like in Critique, and that's a very interesting proposition.

    Going somewhat off-topic, but here goes: while I don't know Critique, what you're describing sounds at least vaguely similar to what this configuration does with reviewdog.

  6. commonquail commented on Dec 31, 2025

    @commonquail
    Contributor

    How is someone supposed to handle such a workload?

    With ratcheting.

    Error Prone can selectively analyze files, although I have not worked on a project where I preferred that approach. I have preferred disabling ~all violated checks, then enabling and resolving them piecemeal. That prevents backsliding, too.

    while I don't know Critique

    Have a look at https://abseil.io/resources/swe-book/html/ch20.html#tricorder_googleapostrophes_static_anal for this case.

    what you're describing sounds at least vaguely similar to what this configuration does with reviewdog.

    Image

    Thank you, that looks interesting! I will investigate this further.

    (If you run Maven with --batch-mode, Maven will not colour its own log output)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions