Skip to content

Commit 88b7e55

Browse files
ci: add checkstyle to workflows (#161)
1 parent 9f506f4 commit 88b7e55

31 files changed

+88
-400
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Analyze and test"
1+
name: "Analyze"
22

33
on:
44
push:
@@ -9,8 +9,8 @@ on:
99
- cron: '0 0 * * 4'
1010

1111
jobs:
12-
analyze_and_test:
13-
name: Analyze and test
12+
analyze:
13+
name: Analyze
1414
runs-on: ubuntu-latest
1515

1616
strategy:

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
restore-keys: ${{ runner.os }}-m2
3636

3737
- name: Build with Maven
38-
run: mvn -B test
38+
run: mvn clean install

checkstyle-suppressions.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
5+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
6+
7+
<suppressions>
8+
<suppress checks="MissingJavadocType" files=".*\.java" />
9+
<suppress checks="AbbreviationAsWordInName" files="Hashing.java|IOfflineHandler.java" />
10+
<suppress checks="MemberName" files="SegmentConditionModel.java" />
11+
</suppressions>

google_checks_v8.19.xml

Lines changed: 0 additions & 259 deletions
This file was deleted.

pom.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<jacksonVersion>2.15.2</jacksonVersion>
4545
<lombok.version>1.18.34</lombok.version>
4646
<slf4j.version>1.7.30</slf4j.version>
47-
<maven.checkstyle.version>3.1.0</maven.checkstyle.version>
47+
<maven.checkstyle.version>3.4.0</maven.checkstyle.version>
4848
<junit.jupiter.version>5.9.2</junit.jupiter.version>
4949
</properties>
5050

@@ -227,11 +227,11 @@
227227
<artifactId>maven-checkstyle-plugin</artifactId>
228228
<version>${maven.checkstyle.version}</version>
229229
<configuration>
230-
<configLocation>google_checks_v8.19.xml</configLocation>
231-
<encoding>UTF-8</encoding>
230+
<configLocation>google_checks.xml</configLocation>
231+
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
232232
<consoleOutput>true</consoleOutput>
233233
<failsOnError>true</failsOnError>
234-
<linkXRef>false</linkXRef>
234+
<linkXRef>true</linkXRef>
235235
<violationSeverity>warning</violationSeverity>
236236
</configuration>
237237
<executions>
@@ -269,9 +269,6 @@
269269
</goals>
270270
</execution>
271271
</executions>
272-
<configuration>
273-
<doclint>all,-missing</doclint>
274-
</configuration>
275272
</plugin>
276273
<plugin>
277274
<groupId>org.apache.maven.plugins</groupId>

src/main/java/com/flagsmith/FlagsmithApiWrapper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public FlagsmithApiWrapper(
6464

6565
/**
6666
* Instantiate with config, custom headers, logger and apikey.
67+
*
6768
* @param defaultConfig config object
6869
* @param customHeaders custom headers list
6970
* @param logger logger instance
@@ -88,6 +89,7 @@ public FlagsmithApiWrapper(
8889

8990
/**
9091
* Instantiate with config, custom headers, logger, apikey and request processor.
92+
*
9193
* @param defaultConfig config object
9294
* @param customHeaders custom headers list
9395
* @param logger logger instance
@@ -112,7 +114,6 @@ public FlagsmithApiWrapper(
112114
* Get Feature Flags from API.
113115
*
114116
* @param doThrow - whether throw exception or not
115-
* @return
116117
*/
117118
public Flags getFeatureFlags(boolean doThrow) {
118119
Flags featureFlags = new Flags();
@@ -302,8 +303,8 @@ private Request.Builder newRequestBuilder() {
302303

303304
/**
304305
* Returns a build request with GET.
306+
*
305307
* @param url - URL to invoke
306-
* @return
307308
*/
308309
@Override
309310
public Request newGetRequest(HttpUrl url) {
@@ -315,9 +316,9 @@ public Request newGetRequest(HttpUrl url) {
315316

316317
/**
317318
* Returns a build request with GET.
319+
*
318320
* @param url - URL to invoke
319321
* @param body - body to post
320-
* @return
321322
*/
322323
@Override
323324
public Request newPostRequest(HttpUrl url, RequestBody body) {

0 commit comments

Comments
 (0)