File tree Expand file tree Collapse file tree 2 files changed +46
-8
lines changed
src/test/java/uk/nhs/digital/nhsconnect/nhais/utils Expand file tree Collapse file tree 2 files changed +46
-8
lines changed Original file line number Diff line number Diff line change 33 workflow_call :
44
55jobs :
6+ checkstyle :
7+ name : Checkstyle
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout Repository
11+ uses : actions/checkout@v4
12+
13+ - name : Setup Java 21 LTS
14+ uses : actions/setup-java@v4
15+ with :
16+ java-version : 21
17+ distribution : ' temurin'
18+
19+ - name : Setup Gradle
20+ uses : gradle/actions/setup-gradle@v4
21+
22+ - name : Checkstyle
23+ run : ./gradlew checkStyleMain checkstyleTest checkstyleIntTest
24+
25+ - name : Collect Artifacts
26+ if : always()
27+ run : |
28+ mkdir -p artifacts
29+ cp -r ./build/reports ./artifacts
30+
31+ - name : Upload Artifacts
32+ uses : actions/upload-artifact@v4
33+ if : always()
34+ with :
35+ name : ' Checkstyle Reports'
36+ path : ./artifacts/**
37+ compression-level : 9
38+
39+ - name : Temporary Artifacts Cleanup
40+ run : rm -rf ./artifacts
41+
642 unit-tests :
743 name : Unit Tests
44+ needs : [ checkstyle ]
845 runs-on : ubuntu-latest
946 steps :
1047 - name : Checkout Repository
4481
4582 component-tests :
4683 name : Component Tests
84+ needs : [ checkstyle ]
4785 runs-on : ubuntu-latest
4886 steps :
4987 - name : Checkout Repository
83121
84122 integration_tests :
85123 name : Integration Tests
124+ needs : [ checkstyle ]
86125 permissions :
87126 contents : read
88127 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -9,17 +9,16 @@ public class PemFormatterTest {
99 @ Test
1010 public void When_CertHasExtraWhitespace_Expect_ItIsTrimmed () {
1111
12- // this warning is suppressed as the extra whitespace (including trailing whitespace) is intentional
13- @ SuppressWarnings ("com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSingleLineCheck" )
12+ //The extra whitespace (including trailing whitespace) is intentional for this test and has been suppressed with `\s`
1413 final String withWhitespace = """
1514 -----BEGIN CERTIFICATE-----
16- MIIFXzCCA0egAwIBAgIJALRbCSor9bEbMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV
17-
18-
15+ MIIFXzCCA0egAwIBAgIJALRbCSor9bEbMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV \s
16+ \s
17+ \s
1918 W/JNIRmhLoeFNGNh8HvhI2PwOCsFiqT1rrCaUtusTyH0Ggs=
20-
21- -----END CERTIFICATE-----
22- """ ;
19+ \s
20+ -----END CERTIFICATE----- \s
21+ \s """ ;
2322
2423 final String trimmed = """
2524 -----BEGIN CERTIFICATE-----
You can’t perform that action at this time.
0 commit comments