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

[PiranhaJava] Update sample project to show option for excluding additional EP checks #103

Open
sivacoder opened this issue Oct 21, 2020 · 4 comments
Assignees
Labels
good first issue Good for newcomers legacy-java Issues/PR related to older PiranhaJava implementation

Comments

@sivacoder
Copy link
Contributor

In the past we have made PR's to Piranha to support additional usage patterns.

While integrating Piranha with multiple java micro services in our organisation, we are noticing lots of Error prone reported violations on our micro-service project and it becomes a hard dependency to fix the violations before integrating Piranha.

For new projects, we can add Error Prone as a dependency from beginning and get going. But for existing services, fixing the error prone violations is becoming hard.

Question:

  1. is it possible to run Piranha without Error Prone as a mandatory dependency in build system?
  2. If not, is it possible to suppress the Error Prone violation as warning instead of build errors?
  3. iI it possible to exclude specific packages from Error Prone scan? (Like available configurations available in Jacoco/find bug and so on)
@mkr-plse
Copy link
Contributor

mkr-plse commented Oct 21, 2020

You should be able to -XepDisableAllChecks and then just enable Piranha check to avoid EP violations. Similarly,
-XepExcludedPaths can be used to exclude certain paths from analysis. See errorprone documentation for more details.

Useful to update the sample project with all EP checks disabled.

@mkr-plse mkr-plse added the legacy-java Issues/PR related to older PiranhaJava implementation label Oct 21, 2020
@lazaroclapp
Copy link
Contributor

lazaroclapp commented Oct 21, 2020

Keep in mind that -XepExcludedPaths will also exclude everything from being processed by Piranha.

-XepDisableAllChecks is what you most likely want, if you are not otherwise using Error Prone, followed by the Piranha specific configuration.

Action item: Let's figure out if we can modify the sample project and README configuration such that it will disable all checks if and only if the build is not already using Error Prone. Otherwise, this might require providing two separate configuration templates.

@lazaroclapp lazaroclapp self-assigned this Oct 21, 2020
@sivacoder
Copy link
Contributor Author

Thanks @lazaroclapp @mkr-plse for the awesome support. We tested with -XepDisableAllChecks and works like charm. Thanks a ton.

@mkr-plse
Copy link
Contributor

@sivacoder Good to know that it worked for you :)
Reopening this issue until the sample project is updated to show this option.

@mkr-plse mkr-plse reopened this Oct 27, 2020
@mkr-plse mkr-plse changed the title [Question] Java-Piranha's dependency on Error Prone [PiranhaJava] Update sample project to show option for excluding additional EP checks Oct 27, 2020
@mkr-plse mkr-plse added the good first issue Good for newcomers label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers legacy-java Issues/PR related to older PiranhaJava implementation
Projects
None yet
Development

No branches or pull requests

3 participants