question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable checks for an entire package.

See original GitHub issue

I’m adding error-prone to a legacy project and have the need to disable/ignore an entire package.

This package is a transplant from a third-party dependency that isn’t published as a consumable artifact but also requires a very small tweak to work in my usage. Since I want to reduce the changes to this package so future updates are easy, I’m hesitant to go in and annotation every type with a suppression for every violation therein.

Unfortunately the @SuppressWarnings annotation can’t be targeted at packages so I can’t use it in a package-info.java either (not sure this would have worked anyway).

Is there any other way of suppressing checks for an entire package? And if not, what do you think about introducing a mechanism for this (e.g., an exclude flag which was a list of globs)?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
kageiitcommented, Mar 10, 2017

I think it very useful to have a glob/pattern matching solution where error prone can skip all analysis on generated code for example. Then it is not purely controlled by an annotation

1reaction
noel-yapcommented, Feb 14, 2017

I have a similar need regarding generated code (gRPC-generated code specifically).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable all checkstyle checks for a specific java package
Your solution works where the entire package name is known. In my case the criteria for selection is that the package name should...
Read more >
Enable and disable check-in policies - Azure Repos
Enable or disable a check-in policy · On the Visual Studio Team menu, select Team Project Settings > Source Control. · In the...
Read more >
Disable and suppress inspections | IntelliJ IDEA Documentation
Locate the inspection you want to disable, and clear the checkbox next to it. Apply the changes and close the dialog. You can...
Read more >
Working with JavaScript in Visual Studio Code
Automatic type acquisition requires npmjs, the Node.js package manager, ... try type checking in a few files but not yet enable it for...
Read more >
The mypy command line - mypy 0.991 documentation
Mypy will recursively type check any submodules of the provided package. ... This flag will disable searching for PEP 561 compliant packages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found