Skip to content

Commit 59ebdcf

Browse files
committed
Improve dependencies and checkstyle config
1 parent e9e063e commit 59ebdcf

4 files changed

Lines changed: 23 additions & 26 deletions

File tree

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def springBootVersion = '2.2.5.RELEASE'
3333

3434
checkstyle {
3535
maxWarnings = 0
36-
toolVersion = '8.24'
36+
toolVersion = '8.29'
37+
// need to set configDir to rootDir otherwise submodule will use submodule/config/checkstyle
38+
configDir = new File(rootDir, 'config/checkstyle')
3739
}
3840

3941
sourceCompatibility = 1.8
@@ -94,7 +96,7 @@ def versions = [
9496
logback : '1.2.3',
9597
springBoot : springBootVersion,
9698
reformJavaLogging: '5.0.1',
97-
junitJupiter : '5.5.1'
99+
junitJupiter : '5.5.2'
98100
]
99101

100102
dependencyManagement {
@@ -154,7 +156,7 @@ dependencies {
154156
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version: '2.24.1'
155157
testImplementation group: 'org.springframework.cloud', name: 'spring-cloud-contract-wiremock'
156158

157-
functionalTestImplementation group: 'uk.gov.hmcts.reform', name: 'service-auth-provider-client', version: '2.0.1'
159+
functionalTestImplementation group: 'uk.gov.hmcts.reform', name: 'service-auth-provider-client', version: '3.1.1'
158160
functionalTestCompileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion
159161
functionalTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
160162
}

config/checkstyle/checkstyle.xml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4-
"https://checkstyle.org/dtds/configuration_1_3.dtd">
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
55

66
<!--
77
Checkstyle configuration that checks the Google coding conventions from Google Java Style
@@ -31,9 +31,8 @@
3131
<property name="max" value="120"/>
3232
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
3333
</module>
34-
<module name="SuppressionFilter">
35-
<property name="file" value="config/checkstyle/suppressions.xml"/>
36-
</module>
34+
35+
<module name="SuppressWarningsFilter" />
3736
<module name="TreeWalker">
3837
<module name="UnusedImports"/>
3938
<module name="HideUtilityClassConstructor"/>
@@ -77,6 +76,9 @@
7776
<message key="ws.notPreceded"
7877
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
7978
</module>
79+
<module name="WhitespaceAfter">
80+
<property name="tokens" value="COMMA, SEMI"/>
81+
</module>
8082
<module name="OneStatementPerLine"/>
8183
<module name="MultipleVariableDeclarations"/>
8284
<module name="ArrayTypeStyle"/>
@@ -86,6 +88,8 @@
8688
<module name="ModifierOrder"/>
8789
<module name="EmptyLineSeparator">
8890
<property name="allowNoEmptyLineBetweenFields" value="true"/>
91+
<property name="allowMultipleEmptyLines" value="false"/>
92+
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
8993
</module>
9094
<module name="SeparatorWrap">
9195
<property name="tokens" value="DOT"/>
@@ -209,6 +213,9 @@
209213
</module>
210214
<module name="NonEmptyAtclauseDescription"/>
211215
<module name="JavadocTagContinuationIndentation"/>
216+
<module name="SummaryJavadoc">
217+
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
218+
</module>
212219
<module name="JavadocParagraph"/>
213220
<module name="AtclauseOrder">
214221
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
@@ -217,11 +224,8 @@
217224
<module name="JavadocMethod">
218225
<property name="scope" value="nothing"/>
219226
<property name="allowMissingParamTags" value="true"/>
220-
<property name="allowMissingThrowsTags" value="true"/>
221227
<property name="allowMissingReturnTag" value="true"/>
222-
<property name="minLineCount" value="2"/>
223228
<property name="allowedAnnotations" value="Override, Test"/>
224-
<property name="allowThrowsTagsForSubclasses" value="true"/>
225229
</module>
226230
<module name="MethodName">
227231
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
@@ -235,5 +239,6 @@
235239
<property name="exceptionVariableName" value="expected"/>
236240
</module>
237241
<module name="CommentsIndentation"/>
242+
<module name="ParameterAssignment"/>
238243
</module>
239244
</module>

config/checkstyle/suppressions.xml

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

src/functionalTest/java/uk/gov/hmcts/reform/payments/client/functional/env/IdamService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ public class IdamService {
1818
private String[] allowedRoles;
1919

2020
/**
21-
* The description of the service
21+
* The description of the service.
2222
*/
2323
private String description;
2424

2525
/**
26-
* Short Identifier for the Service
26+
* Short Identifier for the Service.
2727
*/
2828
private String label;
2929

3030
/**
31-
* The Oauth2 Client Id
31+
* The Oauth2 Client Id.
3232
*/
3333
private String oauth2ClientId;
3434

3535
/**
36-
* The Oauth2 Client secret
36+
* The Oauth2 Client secret.
3737
*/
3838
private String oauth2ClientSecret;
3939

@@ -42,7 +42,7 @@ public class IdamService {
4242
private String oauth2Scope;
4343

4444
/**
45-
* The endpoint used to notify the service about users on-boarding
45+
* The endpoint used to notify the service about users on-boarding.
4646
*/
4747
private String onboardingEndpoint;
4848

0 commit comments

Comments
 (0)