From: kaixiliu Date: Fri, 26 Jul 2024 08:06:39 +0000 (+0800) Subject: server adds checkstyle configuration X-Git-Tag: 15.0.0~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=6c329264074e1dfdae7b413ef8316bc2c2b47e6a;p=usecase-ui%2Fserver.git server adds checkstyle configuration Issue-ID: USECASEUI-839 Change-Id: Ifd43f2b2d8e793378c220e349ee5756520759bbf Signed-off-by: kaixiliu --- diff --git a/checkstyle/pom.xml b/checkstyle/pom.xml new file mode 100644 index 00000000..6c95ffcb --- /dev/null +++ b/checkstyle/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.onap.usecase-ui.server + usecase-ui-server-parent + 14.0.0-SNAPSHOT + + + checkstyle + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/checkstyle/src/main/resources/onap-checkstyle/apache-license-2.regexp.txt b/checkstyle/src/main/resources/onap-checkstyle/apache-license-2.regexp.txt new file mode 100644 index 00000000..5b69f285 --- /dev/null +++ b/checkstyle/src/main/resources/onap-checkstyle/apache-license-2.regexp.txt @@ -0,0 +1,15 @@ +^/[*]+$ +^ \* Copyright .*$ +^ \*( )?$ +^ \* Licensed under the Apache License, Version 2.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License.$ +^ \* You may obtain a copy of the License at$ +^ \*( )?$ +^ \*( )*http://www.apache.org/licenses/LICENSE-2.0$ +^ \*( )?$ +^ \* Unless required by applicable law or agreed to in writing, software +^ \* distributed under the License is distributed on an "AS IS" BASIS, +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +^ \* See the License for the specific language governing permissions and +^ \* limitations under the License. +^ [*]+/$ diff --git a/checkstyle/src/main/resources/onap-checkstyle/check-license.xml b/checkstyle/src/main/resources/onap-checkstyle/check-license.xml new file mode 100644 index 00000000..8421f520 --- /dev/null +++ b/checkstyle/src/main/resources/onap-checkstyle/check-license.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml b/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml new file mode 100644 index 00000000..3de8f610 --- /dev/null +++ b/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index ada40b4c..ff46aa20 100644 --- a/pom.xml +++ b/pom.xml @@ -49,5 +49,6 @@ server standalone + checkstyle diff --git a/server/pom.xml b/server/pom.xml index 85e0890d..9d4d30b9 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -38,6 +38,8 @@ true ${project.version} reuseReports + 3.3.1 + [4.1.2,) @@ -257,6 +259,62 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + ${version.maven-checkstyle-plugin} + + + onap-license + + check + + process-sources + + onap-checkstyle/check-license.xml + false + true + false + + ${project.build.sourceDirectory} + + true + false + warning + + + + onap-java-style + + check + + process-sources + + + onap-checkstyle/onap-java-style.xml + + ${project.build.sourceDirectory} + true + true + true + true + false + warning + + + + + + org.onap.usecase-ui.server + checkstyle + 14.0.0-SNAPSHOT + compile + + + org.codehaus.mojo versions-maven-plugin