Skip to content

Conversation

@codylerum
Copy link
Contributor

@codylerum codylerum commented Apr 5, 2018

This PR implements Googles Error Prone code analysis http://errorprone.info/

I’ve gone through and corrected the raised errors.

Error Prone cannot run on Java 7 and, as I am not a Gradle person, I don’t know how to conditionally run it. Thus the travis step for Java 7 is currently REMOVED. I would imagine that, like Checkstyle, you can configure this to only run for the Java 9 (or current latest) build.

http://errorprone.info/docs/installation

Per Google’s recommendation this is the Gradle plugin used:

https://github.com/tbroyer/Gradle-errorprone-plugin

I’ve also added an Eclipse Java style file that is based off Google’s Java style and tweaked to conform to your Checkstyle. It works for everything I’ve run into, so it’s probably a good starting point.

I would also recommend configuring error prone to fail on warning so that small issues don't creep in over time.

@ob-stripe
Copy link
Contributor

Hi @codylerum, thanks for the PR! This looks super interesting.

We won't be able to merge this PR as is because it includes many different changes, some of which I suspect may be backwards-incompatible. Also, we're in the process of rewriting the test suite (cf. #452) and I'd rather avoid introducing merging more PRs that that affect the test codebase until we're done to avoid painful rebases. Once that's done though, I'm very much in favor of using this!

I'm going to close this PR, but I'll open an issue to keep track of this.

@ob-stripe ob-stripe closed this Apr 6, 2018
@ob-stripe ob-stripe mentioned this pull request Apr 6, 2018
@codylerum
Copy link
Contributor Author

No problem. Let me do a second PR that fixes just the bugs that were identified.

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

Successfully merging this pull request may close these issues.

2 participants