Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/master-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
build-scan:
name: SonarCloud Scan
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v4
Expand All @@ -25,6 +24,9 @@ jobs:
cache: maven

- name: Build/Test & SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
run: mvn -B clean verify -Pcoverage,sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}

build-test:
Expand All @@ -35,7 +37,6 @@ jobs:
java: ['11', '17', '21']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
build-scan:
name: SonarCloud Scan
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v4
Expand All @@ -25,6 +24,9 @@ jobs:
cache: maven

- name: Build/Test & SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
run: mvn -B clean verify -Pcoverage,sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}

build-test:
Expand All @@ -35,7 +37,6 @@ jobs:
java: ['8', '11', '17', '21']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
java: ['11', '17', '21']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v4
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Manual SonarCloud Analysis

on:
workflow_dispatch:
inputs:
pr_id:
description: 'Pull Request ID to analyze'
required: true
type: string

jobs:
sonar-analysis:
name: SonarCloud Analysis for PR
runs-on: ubuntu-latest

steps:
- name: Get PR details
id: pr
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ inputs.pr_id }}
});
core.setOutput('head_ref', pr.data.head.ref);
core.setOutput('base_ref', pr.data.base.ref);
core.setOutput('head_sha', pr.data.head.sha);

- uses: actions/checkout@v4
with:
ref: ${{ steps.pr.outputs.head_sha }}
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: maven

- name: Build/Test & SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
run: |
mvn -B clean verify -Pcoverage,sonar \
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
-Dsonar.pullrequest.key=${{ inputs.pr_id }} \
-Dsonar.pullrequest.branch=${{ steps.pr.outputs.head_ref }} \
-Dsonar.pullrequest.base=${{ steps.pr.outputs.base_ref }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class DateTimeValidator extends Validator {
protected String getFullDate(final String date) {
SwitcherUtils.debug(logger, LOG_DATE, date);

final String time = RegExUtils.removePattern(date, FULL_DATE_REGEX).trim();
final String time = RegExUtils.removePattern((CharSequence) date, FULL_DATE_REGEX).trim();
return getFullTime(date, time);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();

//clean generated outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();

//clean generated outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();

//clean generated outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();

//clean generated outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
executorService.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void setup() throws IOException {
}

@AfterAll
static void tearDown() throws IOException {
static void tearDown() {
MockWebServerHelper.tearDownMockServer();
executorService.shutdown();
}
Expand Down