From ca1deee4d357aa4e69fef5a380df842daeb184fe Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Mon, 14 Nov 2011 08:09:47 -0800 Subject: [PATCH] 7110974: (javac) add coding conventions and style checkers for langtools Reviewed-by: jjg --- langtools/make/build.properties | 4 ++ langtools/make/build.xml | 52 ++++++++++++++++++++ langtools/make/conf/checkstyle-emacs.xsl | 24 +++++++++ langtools/make/conf/checkstyle-langtools.xml | 47 ++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 langtools/make/conf/checkstyle-emacs.xsl create mode 100644 langtools/make/conf/checkstyle-langtools.xml diff --git a/langtools/make/build.properties b/langtools/make/build.properties index 5c4ad09c135..9a44bc4041d 100644 --- a/langtools/make/build.properties +++ b/langtools/make/build.properties @@ -196,3 +196,7 @@ import.jdk.stub.files = \ # An empty value means all tests # Override as desired to run a specific set of tests jtreg.tests = + +# Check style configuration +# overridable name and version +checkstyle.name.version = checkstyle-5.4 diff --git a/langtools/make/build.xml b/langtools/make/build.xml index 42b57c44976..9949480a606 100644 --- a/langtools/make/build.xml +++ b/langtools/make/build.xml @@ -131,8 +131,10 @@ + + @@ -263,6 +265,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -406,6 +443,7 @@ target.java.home = ${target.java.home} jtreg.home = ${jtreg.home} findbugs.home = ${findbugs.home} + checkstyle.home = ${checkstyle.home} + + + + @@ -989,6 +1031,16 @@ + + + + + + + + + diff --git a/langtools/make/conf/checkstyle-emacs.xsl b/langtools/make/conf/checkstyle-emacs.xsl new file mode 100644 index 00000000000..836bb4017fb --- /dev/null +++ b/langtools/make/conf/checkstyle-emacs.xsl @@ -0,0 +1,24 @@ + + + + + +Coding Style Check Results +-------------------------- +Total files checked: + Files with errors: + Total errors: + Errors per file: + + + + + + + + +:: + + + + diff --git a/langtools/make/conf/checkstyle-langtools.xml b/langtools/make/conf/checkstyle-langtools.xml new file mode 100644 index 00000000000..148161a5b69 --- /dev/null +++ b/langtools/make/conf/checkstyle-langtools.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file