Skip to content

Commit fd34939

Browse files
authored
Add Jacoco, Error Prone, CheckStyle (#75)
* Prep for 3.0.0 release * Add ErrorProne, CheckStyle, Jacoco, fix violations
1 parent 1a52137 commit fd34939

File tree

16 files changed

+180
-36
lines changed

16 files changed

+180
-36
lines changed

.mvn/jvm.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
2+
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
3+
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
4+
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
5+
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
6+
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
7+
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
8+
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
9+
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
10+
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED

config/checkstyle.xml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
3+
4+
<!--
5+
Derived Checkstyle configuration that checks the Google naming conventions from Google Java Style
6+
that can be found at https://google.github.io/styleguide/javaguide.html Formatting conventions are
7+
enforced by the spotless plugin.
8+
9+
This configuration is based on the Google Checks that can be found at:
10+
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
11+
12+
-->
13+
14+
<module name="Checker">
15+
<property name="charset" value="UTF-8" />
16+
<property name="fileExtensions" value="java, properties, xml" />
17+
18+
<module name="SuppressWarningsFilter" />
19+
20+
<!-- Excludes all 'module-info.java' files -->
21+
<!-- See https://checkstyle.org/filefilters/index.html -->
22+
<module name="BeforeExecutionExclusionFileFilter">
23+
<property name="fileNamePattern" value="module\-info\.java$" />
24+
</module>
25+
26+
<module name="TreeWalker">
27+
<!-- Make the @SuppressWarnings annotations available to Checkstyle -->
28+
<module name="SuppressWarningsHolder" />
29+
<module name="AbstractClassName">
30+
<property name="format" value="^(Base|Abstract).+$" />
31+
</module>
32+
<module name="MemberName">
33+
<property name="format"
34+
value="^(?!((m|s|my|our|the)[A-Z])[a-zA-Z0-9]*)([a-z][a-zA-Z0-9]*)$" />
35+
<message key="name.invalidPattern"
36+
value="Member ''{0}'' should be named with camelCase and without prefixes." />
37+
</module>
38+
<module name="ParameterName">
39+
<property name="format"
40+
value="^(?!((m|s|my|our|the)[A-Z])[a-zA-Z0-9]*)([a-z][a-zA-Z0-9]*)$" />
41+
<message key="name.invalidPattern"
42+
value="Member ''{0}'' should be named with camelCase and without prefixes." />
43+
</module>
44+
<module name="MethodName">
45+
<property name="format"
46+
value="^(?!((m|s|my|our|the)[A-Z])[a-zA-Z0-9]*)([a-z][a-zA-Z0-9]*)$" />
47+
<message key="name.invalidPattern"
48+
value="Member ''{0}'' should be named with camelCase and without prefixes." />
49+
</module>
50+
<module name="StaticVariableName">
51+
<property name="format"
52+
value="^(?!((m|s|my|our|the)[A-Z])[a-zA-Z0-9]*)([a-z][a-zA-Z0-9]*)$" />
53+
<message key="name.invalidPattern"
54+
value="Member ''{0}'' should be named with camelCase and without prefixes." />
55+
</module>
56+
<module name="NoFinalizer" />
57+
</module>
58+
</module>

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.opencds.cqf.cql.ls</groupId>
1313
<artifactId>cql-ls</artifactId>
14-
<version>3.0.0-SNAPSHOT</version>
14+
<version>3.0.0</version>
1515
</parent>
1616

1717
<dependencies>

debug/server/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<parent>
1212
<groupId>org.opencds.cqf.cql.ls</groupId>
1313
<artifactId>cql-ls</artifactId>
14-
<version>3.0.0-SNAPSHOT</version>
14+
<version>3.0.0</version>
1515
<relativePath>../../pom.xml</relativePath>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>org.opencds.cqf.cql.ls</groupId>
2121
<artifactId>cql-ls-core</artifactId>
22-
<version>3.0.0-SNAPSHOT</version>
22+
<version>3.0.0</version>
2323
</dependency>
2424
<dependency>
2525
<groupId>org.eclipse.lsp4j</groupId>

debug/service/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<parent>
1111
<groupId>org.opencds.cqf.cql.ls</groupId>
1212
<artifactId>cql-ls</artifactId>
13-
<version>3.0.0-SNAPSHOT</version>
13+
<version>3.0.0</version>
1414
<relativePath>../../pom.xml</relativePath>
1515
</parent>
1616

1717
<dependencies>
1818
<dependency>
1919
<groupId>org.opencds.cqf.cql.debug</groupId>
2020
<artifactId>cql-debug-server</artifactId>
21-
<version>3.0.0-SNAPSHOT</version>
21+
<version>3.0.0</version>
2222
</dependency>
2323
<dependency>
2424
<groupId>org.springframework.boot</groupId>

ls/server/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.opencds.cqf.cql.ls</groupId>
1313
<artifactId>cql-ls</artifactId>
14-
<version>3.0.0-SNAPSHOT</version>
14+
<version>3.0.0</version>
1515
<relativePath>../../pom.xml</relativePath>
1616
</parent>
1717

@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>org.opencds.cqf.cql.ls</groupId>
3131
<artifactId>cql-ls-core</artifactId>
32-
<version>3.0.0-SNAPSHOT</version>
32+
<version>3.0.0</version>
3333
</dependency>
3434

3535
<dependency>

ls/server/src/main/java/org/opencds/cqf/cql/ls/server/event/Event.java renamed to ls/server/src/main/java/org/opencds/cqf/cql/ls/server/event/BaseEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.opencds.cqf.cql.ls.server.event;
22

3-
abstract class Event<T> {
3+
abstract class BaseEvent<T> {
44

55
private T params;
66

7-
protected Event(T params) {
7+
protected BaseEvent(T params) {
88
this.params = params;
99
}
1010

ls/server/src/main/java/org/opencds/cqf/cql/ls/server/event/DidChangeTextDocumentEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.eclipse.lsp4j.DidChangeTextDocumentParams;
44

5-
public class DidChangeTextDocumentEvent extends Event<DidChangeTextDocumentParams> {
5+
public class DidChangeTextDocumentEvent extends BaseEvent<DidChangeTextDocumentParams> {
66
public DidChangeTextDocumentEvent(DidChangeTextDocumentParams params) {
77
super(params);
88
}

ls/server/src/main/java/org/opencds/cqf/cql/ls/server/event/DidChangeWatchedFilesEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.eclipse.lsp4j.DidChangeWatchedFilesParams;
44

5-
public class DidChangeWatchedFilesEvent extends Event<DidChangeWatchedFilesParams> {
5+
public class DidChangeWatchedFilesEvent extends BaseEvent<DidChangeWatchedFilesParams> {
66
public DidChangeWatchedFilesEvent(DidChangeWatchedFilesParams params) {
77
super(params);
88
}

ls/server/src/main/java/org/opencds/cqf/cql/ls/server/event/DidCloseTextDocumentEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.eclipse.lsp4j.DidCloseTextDocumentParams;
44

5-
public class DidCloseTextDocumentEvent extends Event<DidCloseTextDocumentParams> {
5+
public class DidCloseTextDocumentEvent extends BaseEvent<DidCloseTextDocumentParams> {
66
public DidCloseTextDocumentEvent(DidCloseTextDocumentParams params) {
77
super(params);
88
}

0 commit comments

Comments
 (0)