diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-21 12:48:29 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2018-09-21 14:33:06 -0400 |
commit | af5e28cc353456a28204ce8ebe792a218607d8c9 (patch) | |
tree | 4c21586f87fce9dedc7d4d106fe559a8f119c4e8 /integrity-audit | |
parent | 9a42498247f49a09b56c381ddb009e02127c2234 (diff) |
Fix policy/common checkstyle issues
The root pom.xml had a syntax error in a declaration. The suppressions
xml was not being found by the sub-modules. It was better to create a
copy in each of the sub-modules where we will not be fixing
abbreviations or the interface declarations in own java file.
Added specific checkstyle files for each submodule.
One interesting note for the InheritDoc tag. It seems that the mvn
compile has a bug that interprets these as missing a period after
the tag. Even though the parent interface has it correctly. It was
easier to just remove it than duplicate.
There are new JIRA's for that work to be done in Dublin.
Fixed some spacing in pom's.
Issue-ID: POLICY-1131
Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'integrity-audit')
-rw-r--r-- | integrity-audit/checkstyle-suppressions.xml | 30 | ||||
-rw-r--r-- | integrity-audit/pom.xml | 220 |
2 files changed, 160 insertions, 90 deletions
diff --git a/integrity-audit/checkstyle-suppressions.xml b/integrity-audit/checkstyle-suppressions.xml new file mode 100644 index 00000000..c97e4c22 --- /dev/null +++ b/integrity-audit/checkstyle-suppressions.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2018 AT&T Technologies. All rights reserved. + ================================================================================ + 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. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.0//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> + +<suppressions> + <suppress checks="AbbreviationAsWordInName" + files="DbDAO.java|DbDAOTest.java" + lines="1-9999"/> +</suppressions> diff --git a/integrity-audit/pom.xml b/integrity-audit/pom.xml index a45dac2c..a0aca29b 100644 --- a/integrity-audit/pom.xml +++ b/integrity-audit/pom.xml @@ -18,101 +18,141 @@ ============LICENSE_END========================================================= --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <artifactId>integrity-audit</artifactId> + <artifactId>integrity-audit</artifactId> - <packaging>jar</packaging> + <packaging>jar</packaging> - <parent> - <groupId>org.onap.policy.common</groupId> - <artifactId>common-modules</artifactId> - <version>1.3.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.policy.common</groupId> + <artifactId>common-modules</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> - <name>Integrity Audit</name> + <name>Integrity Audit</name> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>javax.persistence</artifactId> - </dependency> - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>eclipselink</artifactId> - </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>utils-test</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.policy.common</groupId> - <artifactId>ONAP-Logging</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>javax.persistence</artifactId> + </dependency> + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>eclipselink</artifactId> + </dependency> + <dependency> + <groupId>org.onap.policy.common</groupId> + <artifactId>utils</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.policy.common</groupId> + <artifactId>utils-test</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.policy.common</groupId> + <artifactId>ONAP-Logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + </dependencies> - <build> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings - only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.jacoco</groupId> - <artifactId> - jacoco-maven-plugin - </artifactId> - <versionRange> - [0.7.1.201405082137,) - </versionRange> - <goals> - <goal>prepare-agent</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> + <build> + <plugins> + <plugin> + <artifactId>maven-checkstyle-plugin</artifactId> + <executions> + <execution> + <id>onap-java-style</id> + <goals> + <goal>check</goal> + </goals> + <phase>process-sources</phase> + <configuration> + <!-- Use Google Java Style Guide: + https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml + with minor changes --> + <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> + <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> + <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <includeResources>true</includeResources> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <includeTestResources>true</includeTestResources> + <excludes> + </excludes> + <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation> + <consoleOutput>true</consoleOutput> + <failsOnViolation>true</failsOnViolation> + <violationSeverity>warning</violationSeverity> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.onap.oparent</groupId> + <artifactId>checkstyle</artifactId> + <version>${oparent.version}</version> + <scope>compile</scope> + </dependency> + </dependencies> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings + only. It has no influence on the Maven build itself. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.jacoco</groupId> + <artifactId> + jacoco-maven-plugin + </artifactId> + <versionRange> + [0.7.1.201405082137,) + </versionRange> + <goals> + <goal>prepare-agent</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> </project> |