google / google/error-prone

[Enhancement request] couple of requests for new features

Open
#3,996 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Hello error-prone team,

This is my first post in this repo. I have been using error-prone for half a year now, if not anything else, please allow me to just say thank you for this project.

It is easy to use, and very helpful in finding some corner case bugs.

After half a year of usage, there are some features that we believe might be helpful to the community. Could you please kindly review and consider them?

**- standalone maven plugin**

As of today, in order to use error prone in a maven project (this is not a maven versus other argument), one needs to do something like this:

```

org.apache.maven.plugins
maven-compiler-plugin

UTF-8

-XDcompilePolicy=simple
-Xplugin:ErrorProne



com.google.errorprone
error_prone_core
2.20.0




```

This makes it bound to the maven compiler plugin. Would it be possible, like checkstyle, which google invested in, to have a standalone maven plugin, something like:

```

org.apache.maven.plugins
maven-compiler-plugin
3.11.0


com.google.errorprone
error_prone_core
2.20.0

[...]



org.apache.maven.plugins
maven-checkstyle-plugin
3.3.0

google_checks.xml
target/reports/checkstyle
xml


```

And with that, a standalone maven goal, similar to ```checkstyle:checkstyle``` maybe ```errorprone:errorprone``` (as per your design of course)

(and also, hopefully, to see the needs of ```.mvn/jvm.config``` gone. We need to checkin a rather useless file just to benefits from the scan)

**- disable analysis on test files, or source code files based on a flag or inclusion-exclusion patterns**

As of today, out of the box, the plugin scan the source code, which is great, but also the test files.

It will be great if we can disable the scan on test files, with maybe a flag.

Moreover, it will be great if one can specify exclusion patterns for some specific files not interested in the scan

**Report integration with external tools, such as SonarQube, maven site, maven-project-info-reports-plugin, maven reporting**

As of today, the output of the scan, and the precious information it contains, are left as it is, within the output of the run. It would be great if it can generate some reports, for historical knowledge, and also, integrate some visualization tools, such as SonarQube, or the maven ecosystem.

I hope not to trouble you guys with my writing, just want to make this error-prone even more interesting.

Wishing you a good day!

Thank you

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.