mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8054562: document skip results in RunCodingRules.java
Documenting when RunCodingRules gets skipped; adding a short description of AssertCheckAnalyzer and MutableFieldsAnalyzer Reviewed-by: jjg
This commit is contained in:
parent
f18045ee0b
commit
ef51223aa3
3 changed files with 15 additions and 0 deletions
|
@ -37,6 +37,9 @@ import com.sun.tools.javac.tree.TreeInfo;
|
|||
import com.sun.tools.javac.tree.TreeScanner;
|
||||
import com.sun.tools.javac.util.Assert;
|
||||
|
||||
/**This analyzer guards against complex messages (i.e. those that use string concatenation) passed
|
||||
* to various Assert.check methods.
|
||||
*/
|
||||
public class AssertCheckAnalyzer extends AbstractCodingRulesAnalyzer {
|
||||
|
||||
enum AssertOverloadKind {
|
||||
|
|
|
@ -41,6 +41,7 @@ import static com.sun.tools.javac.code.Flags.STATIC;
|
|||
import static com.sun.tools.javac.code.Flags.SYNTHETIC;
|
||||
import static com.sun.tools.javac.code.Kinds.Kind.*;
|
||||
|
||||
/**This analyzer guards against non-final static fields.*/
|
||||
public class MutableFieldsAnalyzer extends AbstractCodingRulesAnalyzer {
|
||||
|
||||
public MutableFieldsAnalyzer(JavacTask task) {
|
||||
|
|
|
@ -50,6 +50,17 @@ import javax.tools.ToolProvider;
|
|||
|
||||
import com.sun.tools.javac.util.Assert;
|
||||
|
||||
/**
|
||||
* This is a test to verify specific coding standards for source code in the langtools repository.
|
||||
*
|
||||
* As such, it is not a standard unit, regression or functional test, and will
|
||||
* automatically skip if the langtools source code is not available.
|
||||
*
|
||||
* If the source code is available, it will find and compile the coding
|
||||
* style analyzers found in langtools/make/tools/crules/*.java, and run the resulting
|
||||
* code on all source files under langtools/src/share/classes. Any coding style
|
||||
* violations will cause the test to fail.
|
||||
*/
|
||||
public class RunCodingRules {
|
||||
public static void main(String... args) throws Exception {
|
||||
new RunCodingRules().run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue