Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Commit d1a416c

Browse files
committed
#13 Relevant parts of
#13
1 parent f8a58b0 commit d1a416c

2 files changed

Lines changed: 263 additions & 128 deletions

File tree

checkstyle-config/check_style.xml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5+
<!--keep the file in project root although NetBeans 8.0.2 doesn't find it there and allow to add additional project files (don't skip a proper project structure in favour of IDE deficies)-->
6+
<module name="Checker">
7+
<!-- Checks that there are no tab characters ('\t') in the source code. -->
8+
<module name="FileTabCharacter">
9+
<!-- Report on each line in each file -->
10+
<property name="eachLine" value="true"/>
11+
</module>
12+
<module name="TreeWalker">
13+
<!-- No EOL should be placed before block start ('{') -->
14+
<module name="LeftCurly">
15+
<property name="option" value="eol"/>
16+
<property name="severity" value="error"/>
17+
</module>
18+
<!-- '}' rules -->
19+
<module name="RightCurly">
20+
<!-- '}' should be on the same line as a next statement -->
21+
<property name="option" value="same"/>
22+
<property name="severity" value="error"/>
23+
</module>
24+
<!-- Braces are mandatory around code blocks -->
25+
<module name="NeedBraces">
26+
<property name="severity" value="error"/>
27+
</module>
28+
29+
<!-- Javadoc -->
30+
<!-- Checks the Javadoc of a method or constructor. -->
31+
<module name="JavadocMethod">
32+
<property name="scope" value="public"/>
33+
<property name="allowMissingJavadoc" value="true"/>
34+
<property name="severity" value="error"/>
35+
</module>
36+
<!-- Checks Javadoc comments for class and interface definitions. -->
37+
<module name="JavadocType">
38+
<property name="scope" value="public"/>
39+
<property name="severity" value="error"/>
40+
</module>
41+
<module name="AtclauseOrder"/>
42+
<module name="JavadocTagContinuationIndentation">
43+
<property name="offset" value="4"/>
44+
</module>
45+
<module name="NonEmptyAtclauseDescription"/>
46+
<!--<module name="SummaryJavadocCheck"/>-->
47+
<!-- requires all methods to have a Javadoc -->
48+
49+
<!-- Checks for Naming Conventions. -->
50+
<!-- See http://checkstyle.sourceforge.net/config_naming.html -->
51+
<!-- Sun Naming Conventions -->
52+
<module name="ConstantName"/>
53+
<module name="LocalFinalVariableName"/>
54+
<module name="LocalVariableName"/>
55+
<module name="MemberName"/>
56+
<module name="MethodName"/>
57+
<module name="PackageName"/>
58+
<module name="ParameterName"/>
59+
<module name="StaticVariableName"/>
60+
<module name="TypeName"/>
61+
<!-- Checks correct indentation of Java Code. -->
62+
<module name="Indentation">
63+
<!-- how many spaces to use for new indentation level -->
64+
<property name="basicOffset" value="4" />
65+
<!-- how far brace should be indented when on next line -->
66+
<property name="braceAdjustment" value="0"/>
67+
<!-- how much to indent a case label -->
68+
<property name="caseIndent" value="4"/>
69+
</module>
70+
<!-- Specify method parameters code conventions -->
71+
<!--<module name="MethodParamPad">
72+
Whitespace is required after method name
73+
<property name="option" value="space" />
74+
Check only methods and constructors declarations
75+
<property name="tokens" value="METHOD_DEF, CTOR_DEF" />
76+
</module> -->
77+
<!-- Checks the policy on the padding of parentheses; i.e. whether a space is required after a left parenthesis and before a
78+
right parenthesis, or such spaces are forbidden. -->
79+
<!--<module name="ParenPad">
80+
Whitespace required before ')' and after ')'
81+
<property name="option" value="space"/>
82+
</module> -->
83+
<module name="Regexp">
84+
<property name="format" value="[ \t]+$"/>
85+
<property name="illegalPattern" value="true"/>
86+
<property name="message" value="Trailing whitespace"/>
87+
</module>
88+
<module name="UnusedImports"/>
89+
<module name="RedundantImport"/>
90+
<module name="ImportOrder">
91+
<property name="option" value="inflow"/>
92+
</module>
93+
</module>
94+
</module>

pom.xml

Lines changed: 169 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,169 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4-
5-
<modelVersion>4.0.0</modelVersion>
6-
<parent>
7-
<version>4.0.1</version>
8-
<artifactId>opower-parent</artifactId>
9-
<groupId>com.opower</groupId>
10-
</parent>
11-
<groupId>com.opower.unitsofmeasure</groupId>
12-
<artifactId>jackson-module-unitsofmeasure</artifactId>
13-
<packaging>jar</packaging>
14-
<version>1.3.5-SNAPSHOT</version>
15-
16-
<name>Jackson Units of Measurement Module</name>
17-
<description>Contains custom serializers and deserializers for JSR 363.</description>
18-
19-
<!-- ======================================================= -->
20-
<!-- Build Settings -->
21-
<!-- ======================================================= -->
22-
<properties>
23-
<project.build.javaVersion>1.8</project.build.javaVersion>
24-
<jdkVersion>1.8</jdkVersion>
25-
<maven.compile.targetLevel>1.6</maven.compile.targetLevel>
26-
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
27-
<api.version>1.0</api.version>
28-
<impl.version>1.0.7</impl.version>
29-
<lib.version>1.0.2</lib.version> <!-- currently unused -->
30-
<ucum.version>0.7.1</ucum.version>
31-
<jackson.version>2.2.2</jackson.version>
32-
<junit.version>4.12</junit.version>
33-
</properties>
34-
35-
<dependencies>
36-
<!-- =========================================================================================================== -->
37-
<!-- The units of measurement interface is in the javax.measure package. -->
38-
<!-- The implementation is provided by JSR 363 -->
39-
<!-- =========================================================================================================== -->
40-
<dependency>
41-
<groupId>javax.measure</groupId>
42-
<artifactId>unit-api</artifactId>
43-
<version>${api.version}</version>
44-
</dependency>
45-
<dependency>
46-
<groupId>tec.uom</groupId>
47-
<artifactId>uom-se</artifactId>
48-
<version>${impl.version}</version>
49-
</dependency>
50-
<dependency>
51-
<groupId>systems.uom</groupId>
52-
<artifactId>systems-quantity</artifactId>
53-
<version>${ucum.version}</version>
54-
</dependency>
55-
<dependency>
56-
<groupId>systems.uom</groupId>
57-
<artifactId>systems-ucum-java8</artifactId>
58-
<version>${ucum.version}</version>
59-
</dependency>
60-
61-
<!-- =========================================================================================================== -->
62-
<!-- Jackson library for JSON-parsing -->
63-
<!-- =========================================================================================================== -->
64-
<dependency>
65-
<groupId>com.fasterxml.jackson.core</groupId>
66-
<artifactId>jackson-core</artifactId>
67-
<version>${jackson.version}</version>
68-
</dependency>
69-
<dependency>
70-
<groupId>com.fasterxml.jackson.core</groupId>
71-
<artifactId>jackson-databind</artifactId>
72-
<version>${jackson.version}</version>
73-
</dependency>
74-
75-
<dependency>
76-
<groupId>junit</groupId>
77-
<artifactId>junit</artifactId>
78-
<version>${junit.version}</version>
79-
<scope>test</scope>
80-
</dependency>
81-
</dependencies>
82-
83-
<build>
84-
<plugins>
85-
<plugin>
86-
<groupId>org.apache.maven.plugins</groupId>
87-
<artifactId>maven-compiler-plugin</artifactId>
88-
<configuration>
89-
<source>${jdkVersion}</source>
90-
<target>${jdkVersion}</target>
91-
</configuration>
92-
</plugin>
93-
</plugins>
94-
<pluginManagement>
95-
<plugins>
96-
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
97-
<plugin>
98-
<groupId>org.eclipse.m2e</groupId>
99-
<artifactId>lifecycle-mapping</artifactId>
100-
<version>1.0.0</version>
101-
<configuration>
102-
<lifecycleMappingMetadata>
103-
<pluginExecutions>
104-
<pluginExecution>
105-
<pluginExecutionFilter>
106-
<groupId>org.jacoco</groupId>
107-
<artifactId>
108-
jacoco-maven-plugin
109-
</artifactId>
110-
<versionRange>
111-
[0.7.0.201403182114,)
112-
</versionRange>
113-
<goals>
114-
<goal>prepare-agent</goal>
115-
</goals>
116-
</pluginExecutionFilter>
117-
<action>
118-
<ignore></ignore>
119-
</action>
120-
</pluginExecution>
121-
</pluginExecutions>
122-
</lifecycleMappingMetadata>
123-
</configuration>
124-
</plugin>
125-
</plugins>
126-
</pluginManagement>
127-
</build>
128-
</project>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<version>4.0.1</version>
9+
<artifactId>opower-parent</artifactId>
10+
<groupId>com.opower</groupId>
11+
</parent>
12+
<groupId>com.opower.unitsofmeasure</groupId>
13+
<artifactId>jackson-module-unitsofmeasure</artifactId>
14+
<packaging>jar</packaging>
15+
<version>1.3.5-SNAPSHOT</version>
16+
17+
<name>Jackson Units of Measurement Module</name>
18+
<description>Contains custom serializers and deserializers for JSR 363.</description>
19+
20+
<!-- ======================================================= -->
21+
<!-- Build Settings -->
22+
<!-- ======================================================= -->
23+
<properties>
24+
<project.build.javaVersion>1.8</project.build.javaVersion>
25+
<jdkVersion>1.8</jdkVersion>
26+
<maven.compile.targetLevel>1.6</maven.compile.targetLevel>
27+
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
28+
<api.version>1.0</api.version>
29+
<impl.version>1.0.7</impl.version>
30+
<lib.version>1.0.2</lib.version> <!-- currently unused -->
31+
<ucum.version>0.7.1</ucum.version>
32+
<jackson.version>2.2.2</jackson.version>
33+
<junit.version>4.12</junit.version>
34+
</properties>
35+
36+
<dependencies>
37+
<!-- =========================================================================================================== -->
38+
<!-- The units of measurement interface is in the javax.measure package. -->
39+
<!-- The implementation is provided by JSR 363 -->
40+
<!-- =========================================================================================================== -->
41+
<dependency>
42+
<groupId>javax.measure</groupId>
43+
<artifactId>unit-api</artifactId>
44+
<version>${api.version}</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>tec.uom</groupId>
48+
<artifactId>uom-se</artifactId>
49+
<version>${impl.version}</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>systems.uom</groupId>
53+
<artifactId>systems-quantity</artifactId>
54+
<version>${ucum.version}</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>systems.uom</groupId>
58+
<artifactId>systems-ucum-java8</artifactId>
59+
<version>${ucum.version}</version>
60+
</dependency>
61+
62+
<!-- =========================================================================================================== -->
63+
<!-- Jackson library for JSON-parsing -->
64+
<!-- =========================================================================================================== -->
65+
<dependency>
66+
<groupId>com.fasterxml.jackson.core</groupId>
67+
<artifactId>jackson-core</artifactId>
68+
<version>${jackson.version}</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>com.fasterxml.jackson.core</groupId>
72+
<artifactId>jackson-databind</artifactId>
73+
<version>${jackson.version}</version>
74+
</dependency>
75+
76+
<dependency>
77+
<groupId>junit</groupId>
78+
<artifactId>junit</artifactId>
79+
<version>${junit.version}</version>
80+
<scope>test</scope>
81+
</dependency>
82+
</dependencies>
83+
84+
<build>
85+
<plugins>
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-compiler-plugin</artifactId>
89+
<configuration>
90+
<source>${jdkVersion}</source>
91+
<target>${jdkVersion}</target>
92+
</configuration>
93+
</plugin>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-checkstyle-plugin</artifactId>
97+
<version>3.0.0</version>
98+
<executions>
99+
<execution>
100+
<id>check_style</id>
101+
<goals>
102+
<goal>check</goal>
103+
</goals>
104+
<phase>validate</phase>
105+
<configuration>
106+
<configLocation>checkstyle-config/check_style.xml</configLocation>
107+
</configuration>
108+
</execution>
109+
</executions>
110+
<configuration>
111+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
112+
</configuration>
113+
</plugin>
114+
</plugins>
115+
<pluginManagement>
116+
<plugins>
117+
<!--This plugin's configuration is used to store Eclipse m2e settings
118+
only. It has no influence on the Maven build itself. -->
119+
<plugin>
120+
<groupId>org.eclipse.m2e</groupId>
121+
<artifactId>lifecycle-mapping</artifactId>
122+
<version>1.0.0</version>
123+
<configuration>
124+
<lifecycleMappingMetadata>
125+
<pluginExecutions>
126+
<pluginExecution>
127+
<pluginExecutionFilter>
128+
<groupId>org.jacoco</groupId>
129+
<artifactId>
130+
jacoco-maven-plugin
131+
</artifactId>
132+
<versionRange>
133+
[0.7.0.201403182114,)
134+
</versionRange>
135+
<goals>
136+
<goal>prepare-agent</goal>
137+
</goals>
138+
</pluginExecutionFilter>
139+
<action>
140+
<ignore></ignore>
141+
</action>
142+
</pluginExecution>
143+
<pluginExecution>
144+
<pluginExecutionFilter>
145+
<groupId>
146+
org.apache.maven.plugins
147+
</groupId>
148+
<artifactId>
149+
maven-checkstyle-plugin
150+
</artifactId>
151+
<versionRange>
152+
[3.0.0,)
153+
</versionRange>
154+
<goals>
155+
<goal>check</goal>
156+
</goals>
157+
</pluginExecutionFilter>
158+
<action>
159+
<ignore></ignore>
160+
</action>
161+
</pluginExecution>
162+
</pluginExecutions>
163+
</lifecycleMappingMetadata>
164+
</configuration>
165+
</plugin>
166+
</plugins>
167+
</pluginManagement>
168+
</build>
169+
</project>

0 commit comments

Comments
 (0)