Nodeclipse / nodeclipse

Nodeclipse-1 : Eclipse plugin for Node.js, PhantomJS development (Nodeclipse core plugin); Maven and Gradle (with Android) plugins
https://nodeclipse.github.io/
158 stars 78 forks source link

Error Prone Static Analysis Tool #229

Closed chbrown13 closed 5 years ago

chbrown13 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.

paulvi commented 5 years ago

Automated advertising is spam ! This is Error Prone approach.

https://github.com/chbrown13/tool-recommender-bot

There is a lot of static analysis tools out there.