From bef4bf27973c235de05422a62154ec43417688eb Mon Sep 17 00:00:00 2001 From: kaixiliu Date: Thu, 25 Jul 2024 17:52:00 +0800 Subject: intent adds checkstyle configuration Issue-ID: USECASEUI-839 Change-Id: I6cff70ca761d814c2ded1a42f5264c75a93a67cb Signed-off-by: kaixiliu --- checkstyle/pom.xml | 20 ++ .../onap-checkstyle/apache-license-2.regexp.txt | 15 + .../resources/onap-checkstyle/check-license.xml | 35 +++ .../resources/onap-checkstyle/onap-java-style.xml | 338 +++++++++++++++++++++ intentanalysis/pom.xml | 58 ++++ pom.xml | 1 + 6 files changed, 467 insertions(+) create mode 100644 checkstyle/pom.xml create mode 100644 checkstyle/src/main/resources/onap-checkstyle/apache-license-2.regexp.txt create mode 100644 checkstyle/src/main/resources/onap-checkstyle/check-license.xml create mode 100644 checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml diff --git a/checkstyle/pom.xml b/checkstyle/pom.xml new file mode 100644 index 0000000..800fe43 --- /dev/null +++ b/checkstyle/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.onap.usecase-ui.intent-analysis + usecase-ui-intent-analysis-parent + 14.0.0-SNAPSHOT + + org.onap.usecase-ui.intent-analysis + 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 0000000..5b69f28 --- /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 0000000..8421f52 --- /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 0000000..3de8f61 --- /dev/null +++ b/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intentanalysis/pom.xml b/intentanalysis/pom.xml index 2aea179..dea8b5d 100644 --- a/intentanalysis/pom.xml +++ b/intentanalysis/pom.xml @@ -41,6 +41,8 @@ reuseReports 5.9.0-RC1 1.9.0-RC1 + 3.3.1 + [4.1.2,) @@ -220,6 +222,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.intent-analysis + checkstyle + 14.0.0-SNAPSHOT + compile + + + org.springframework.boot spring-boot-maven-plugin diff --git a/pom.xml b/pom.xml index fda82b3..0d06898 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,7 @@ intentanalysis standalone + checkstyle -- cgit 1.2.3-korg