Review checkstyle configuration 35/122635/1
authorBruno Sakoto <bruno.sakoto@bell.ca>
Wed, 14 Jul 2021 15:15:48 +0000 (11:15 -0400)
committerBruno Sakoto <bruno.sakoto@bell.ca>
Wed, 14 Jul 2021 15:24:14 +0000 (11:24 -0400)
Existing violation is also fixed.

Issue-ID: CPS-504
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Ib7ebb62d0181f92803b5faa64d9a638b17fcbdb8

pom.xml
src/main/java/org/onap/cps/ncmp/rest/controller/DmiRestController.java

diff --git a/pom.xml b/pom.xml
index 1f3c204..73f6908 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
                 <executions>
+                    <execution>
+                        <id>onap-license</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <configLocation>onap-checkstyle/check-license.xml</configLocation>
+                            <includeResources>false</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>false</includeTestResources>
+                            <sourceDirectories>
+                                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            </sourceDirectories>
+                            <consoleOutput>false</consoleOutput>
+                            <violationSeverity>warning</violationSeverity>
+                            <failOnViolation>true</failOnViolation>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+                            <sourceDirectories>
+                                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                            </sourceDirectories>
+                            <includeResources>true</includeResources>
+                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                            <includeTestResources>true</includeTestResources>
+                            <consoleOutput>false</consoleOutput>
+                            <violationSeverity>warning</violationSeverity>
+                            <failOnViolation>true</failOnViolation>
+                        </configuration>
+                    </execution>
                     <execution>
                         <id>cps-java-style</id>
                         <goals>
index 5754210..16fb73a 100644 (file)
@@ -37,7 +37,7 @@ public class DmiRestController implements DmiPluginApi {
 
     @Override
     public ResponseEntity<Object> helloWorld() {
-        final var helloWorld = dmiService.getHelloWorld()   ;
+        final var helloWorld = dmiService.getHelloWorld();
         return new ResponseEntity<>(helloWorld, HttpStatus.OK);
     }