twitter / hbc

A Java HTTP client for consuming Twitter's realtime Streaming API
https://developer.twitter.com/en/docs/tweets/filter-realtime/overview
Apache License 2.0
962 stars 373 forks source link

Error Prone Static Analysis Tool #195

Closed cass-green closed 2 years ago

cass-green commented 5 years ago

Looks like you're not using any error-checking in your Java build. This pull requests adds a static analysis tool, Error Prone, created by Google to find common errors in Java code. For example, running mvn compile on the following code:

public boolean validate(String s) {
    return s == this.username;
}

would identify this error:

[ERROR] src/main/java/HelloWorld.java:[17,17] error: [StringEquality] String comparison using reference equality instead of value equality
[ERROR]     (see https://errorprone.info/bugpattern/StringEquality)

If you think you might want to try out this plugin, you can just merge this pull request. Please feel free to add any comments below explaining why you did or did not find this recommendation useful.

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 56.196% when pulling 8cc700e0e7f4b24aab24323d8e91ade3b5a1776d on cass-green:master into 72a8d0b44ba824a722cf4ee7ed9f9bc34d02d92c on twitter:master.