Skip to content

Commit fffa693

Browse files
committed
what lint rules will be good to have
1 parent a7acc76 commit fffa693

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎LINTS.md‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Lints
22

3-
1. all Overridden methods have an `@Override` annotation
3+
1. all Overridden methods must have an `@Override` annotation
44

55
## Style Guide
66

@@ -11,3 +11,27 @@
1111
and how to enforce it ?
1212

1313
2. like "go format", format java code
14+
15+
## Tools
16+
17+
- https://github.com/mcandre/linters#java
18+
19+
[javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html) offers a `-Xlint` option to print additional warnings. The [maven-compiler-plugin](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html) can be configured to automatically pass `-Xlint` to the underlying Java compiler every time a project is built.
20+
21+
In Java 8, javac will feature an `-Xdoclint` option to identify undocumented code.
22+
23+
[CheckStyle](http://checkstyle.sourceforge.net/), with decent CLI support, as well as decent Maven support, through [maven-checkstyle-plugin](http://maven.apache.org/plugins/maven-checkstyle-plugin/). Checkstyle also supports identifying undocumented code, through its [JavaDoc](http://checkstyle.sourceforge.net/config_javadoc.html) settings.
24+
25+
[FindBugs](http://findbugs.sourceforge.net/) is an old Java linter, but has kept up with Java advances (for example, by offering a standard Gradle plugin).
26+
27+
[PMD](http://pmd.sourceforge.net/) detects flaws and duplicated code.
28+
29+
[Error-prone](https://github.com/google/error-prone) catches common Java mistakes as compile-time errors.
30+
31+
[Android lint](http://tools.android.com/tips/lint) checks Android source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization.
32+
33+
[Infer](http://fbinfer.com/) is a static program analyzer for Java, C, and Objective-C, written in OCaml.
34+
35+
- jlint
36+
http://artho.com/jlint/
37+
- https://atom.io/packages/linter-javac

0 commit comments

Comments
 (0)