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

Is there a way to skipp checking of tests #789

Closed
nagkumar opened this issue Jul 20, 2023 · 2 comments
Closed

Is there a way to skipp checking of tests #789

nagkumar opened this issue Jul 20, 2023 · 2 comments

Comments

@nagkumar
Copy link

experiments\java\edu\src\main\java\com\tejasoft\tests\ju\ju5\ut\suites\learn\TestExGroupAsserts.java:21: warning: [ComplexBooleanConstant] This expression always evaluates to `true`, prefer a boolean literal for clarity.
		  () -> assertTrue("2nd Assert Pass", 2 == 2),
		                                        ^

Is there a way to exclude packages such as .tests. packages etc

or is there any annotation added to method or line so that checks can be avoided for that line, method, class or package & all the subpackages etc

@msridhar
Copy link
Collaborator

See here for suppressing warnings:

https://github.com/uber/NullAway/wiki/Suppressing-Warnings

Here for how to exclude code from checking in a variety of ways:

https://github.com/uber/NullAway/wiki/Configuration

And finally you could configure your build system to not run NullAway on tests:

https://github.com/tbroyer/gradle-errorprone-plugin/blob/main/README.md?plain=1#L60

@msridhar msridhar closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2023
@nagkumar
Copy link
Author

https://github.com/uber/NullAway/wiki/Configuration

seeing this, may be content can give insights of what is the patterns of package details are allowed e.g

not sure if I can give com.tejasoft.tests.** to exclude all such files exactly like ant beautifully simplifies include and excludes in fileset.

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

No branches or pull requests

2 participants