From e4a7665ca6764896b83e968e9ef5c7ab8ef6b0d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:36:50 +0000 Subject: [PATCH 1/2] Bump se.bjurr.violations:violations-lib from 1.157.1 to 1.157.3 Bumps [se.bjurr.violations:violations-lib](https://github.com/tomasbjerre/violations-lib) from 1.157.1 to 1.157.3. - [Changelog](https://github.com/tomasbjerre/violations-lib/blob/master/CHANGELOG.md) - [Commits](https://github.com/tomasbjerre/violations-lib/compare/1.157.1...1.157.3) --- updated-dependencies: - dependency-name: se.bjurr.violations:violations-lib dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 38bbcc7ce..fa15375f0 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 1.12.0 1.4.0 2.0.16 - 1.157.1 + 1.157.3 1.18.1 20240303 2.5.1 From bb361929ab02e2f81ced528da6b39b4fe9c8adaa Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sun, 8 Sep 2024 21:36:15 +0200 Subject: [PATCH 2/2] Update SARIF test: use new message content. --- SUPPORTED-FORMATS.md | 2 +- .../parser/violations/SarifAdapterTest.java | 4 +- .../edu/hm/hafner/analysis/parser/package.xml | 293 ++++++++++++++++++ 3 files changed, 296 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/edu/hm/hafner/analysis/parser/package.xml diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index ea3906ff6..49bdc8f51 100644 --- a/SUPPORTED-FORMATS.md +++ b/SUPPORTED-FORMATS.md @@ -1,4 +1,4 @@ - + # Supported Report Formats The static analysis model supports the following report formats. diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java index 86e8358ca..4878f7243 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java @@ -27,13 +27,13 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti .hasLineStart(123) .hasType("Cyclomatic complexity") .hasSeverity(Severity.WARNING_HIGH); - softly.assertThat(report.get(0).getMessage()).matches("asdasd\\s*asdasd"); + softly.assertThat(report.get(0).getMessage()).matches("asdasd"); softly.assertThat(report.get(1)) .hasFileName("/whatever/path.c") .hasLineStart(123) .hasType("-") .hasSeverity(Severity.WARNING_LOW); - softly.assertThat(report.get(1).getMessage()).matches("asdasd\\s*asdasd"); + softly.assertThat(report.get(1).getMessage()).matches("asdasd"); } @Test diff --git a/src/test/resources/edu/hm/hafner/analysis/parser/package.xml b/src/test/resources/edu/hm/hafner/analysis/parser/package.xml new file mode 100644 index 000000000..f8cd56d33 --- /dev/null +++ b/src/test/resources/edu/hm/hafner/analysis/parser/package.xml @@ -0,0 +1,293 @@ + + + + message + description + 1 + 2 + origin + package-name 1 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 2 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 3 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 4 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 5 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 6 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 7 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 8 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 9 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 10 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 11 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 12 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 13 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 14 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 15 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 16 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 17 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 18 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 19 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 20 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 21 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 22 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 23 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 24 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 25 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 26 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 27 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 28 + file-name + fingerprint + + + message + description + 1 + 2 + origin + package-name 29 + file-name + fingerprint + +