From 9b6c06cb3108c20538f22136903805f0bac3e3fa Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 05:53:03 +0000 Subject: [PATCH 1/2] Bump violations-lib from 1.118 to 1.121 Bumps [violations-lib](https://github.com/tomasbjerre/violations-lib) from 1.118 to 1.121. - [Release notes](https://github.com/tomasbjerre/violations-lib/releases) - [Changelog](https://github.com/tomasbjerre/violations-lib/blob/master/CHANGELOG.md) - [Commits](https://github.com/tomasbjerre/violations-lib/compare/1.118...1.121) Signed-off-by: dependabot-preview[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e3fde6e30..607d3145d 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ 6.0.4 1.4.0 1.7.30 - 1.118 + 1.121 20200518 -Djava.util.logging.config.file=logging.properties From 2fbd9e3dddf33cc39a385b65806b736e4deb3133 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 19 Aug 2020 15:15:50 +0200 Subject: [PATCH 2/2] Update violations lib adapters and tests to new Set API. --- .../violations/AbstractViolationAdapter.java | 24 ++++++++++--- .../parser/violations/CppCheckAdapter.java | 3 +- .../AndroidLintParserAdapterTest.java | 20 +++++------ .../violations/CodeNarcAdapterTest.java | 2 +- .../violations/CppCheckAdapterTest.java | 12 +++---- .../parser/violations/DocFxAdapterTest.java | 14 ++++---- .../parser/violations/Flake8AdapterTest.java | 14 ++++---- .../parser/violations/JsHintAdapterTest.java | 2 +- .../parser/violations/MyPyAdapterTest.java | 4 +-- .../parser/violations/PitAdapterTest.java | 18 +++++----- .../violations/PyDocStyleAdapterTest.java | 2 +- .../ResharperInspectCodeAdapterTest.java | 35 ++++++++----------- .../parser/violations/XmlLintAdapterTest.java | 2 +- .../violations/YamlLintAdapterTest.java | 2 +- .../parser/violations/ZptLintAdapterTest.java | 2 +- 15 files changed, 83 insertions(+), 73 deletions(-) diff --git a/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java b/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java index 360d4364a..56c3fcbd0 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java @@ -1,6 +1,7 @@ package edu.hm.hafner.analysis.parser.violations; -import java.util.List; +import java.util.Set; +import java.util.logging.Level; import edu.hm.hafner.analysis.Issue; import edu.hm.hafner.analysis.IssueBuilder; @@ -11,6 +12,7 @@ import edu.hm.hafner.analysis.Report; import edu.hm.hafner.analysis.Severity; +import se.bjurr.violations.lib.ViolationsLogger; import se.bjurr.violations.lib.model.SEVERITY; import se.bjurr.violations.lib.model.Violation; import se.bjurr.violations.lib.parsers.ViolationsParser; @@ -30,7 +32,7 @@ public Report parse(final ReaderFactory readerFactory) throws ParsingCanceledException, ParsingException { try { ViolationsParser parser = createParser(); - List violations = parser.parseReportOutput(readerFactory.readString()); + Set violations = parser.parseReportOutput(readerFactory.readString(), new NullViolationsLogger()); return convertToReport(violations); } catch (Exception exception) { @@ -53,7 +55,7 @@ public Report parse(final ReaderFactory readerFactory) * * @return the report */ - Report convertToReport(final List violations) { + Report convertToReport(final Set violations) { Report report = new Report(); for (Violation violation : violations) { if (isValid(violation)) { @@ -136,7 +138,6 @@ void extractAdditionalProperties(final IssueBuilder builder, final Violation vio * * @return the {@link Severity} */ - @SuppressWarnings("unused") Severity convertSeverity(final SEVERITY severity, final Violation violation) { if (severity == SEVERITY.ERROR) { return Severity.WARNING_HIGH; @@ -146,4 +147,19 @@ Severity convertSeverity(final SEVERITY severity, final Violation violation) { } return Severity.WARNING_LOW; } + + /** + * A logger that does nothing. + */ + private static class NullViolationsLogger implements ViolationsLogger { + @Override + public void log(final Level level, final String s) { + // do not log anything + } + + @Override + public void log(final Level level, final String s, final Throwable throwable) { + // do not log anything + } + } } diff --git a/src/main/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapter.java b/src/main/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapter.java index bb3a4af54..406014664 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapter.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapter.java @@ -3,6 +3,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import edu.hm.hafner.analysis.IssueBuilder; @@ -27,7 +28,7 @@ CPPCheckParser createParser() { } @Override - Report convertToReport(final List violations) { + Report convertToReport(final Set violations) { Map> violationsPerGroup = new LinkedHashSet<>(violations).stream().collect(Collectors.groupingBy(Violation::getGroup)); diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/AndroidLintParserAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/AndroidLintParserAdapterTest.java index faeeeb989..9398597d4 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/AndroidLintParserAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/AndroidLintParserAdapterTest.java @@ -19,15 +19,6 @@ class AndroidLintParserAdapterTest extends AbstractParserTest { protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(2); softly.assertThat(report.get(0)) - .hasFileName("app/src/main/res/layout/fragment_main.xml") - .hasCategory("Correctness") - .hasLineStart(10) - .hasLineEnd(10) - .hasColumnStart(9) - .hasColumnEnd(9) - .hasSeverity(Severity.WARNING_NORMAL); - softly.assertThat(report.get(0).getMessage()).contains("ScrollView size validation"); - softly.assertThat(report.get(1)) .hasFileName( ".gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.4.0/5b72bf48563ea8410e650de14aa33ff69a3e8c35/okio-1.4.0.jar") .hasCategory("Correctness") @@ -36,7 +27,16 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti .hasColumnStart(0) .hasColumnEnd(0) .hasSeverity(Severity.WARNING_HIGH); - softly.assertThat(report.get(1).getMessage()).contains("Package not included in Android"); + softly.assertThat(report.get(0).getMessage()).contains("Package not included in Android"); + softly.assertThat(report.get(1)) + .hasFileName("app/src/main/res/layout/fragment_main.xml") + .hasCategory("Correctness") + .hasLineStart(10) + .hasLineEnd(10) + .hasColumnStart(9) + .hasColumnEnd(9) + .hasSeverity(Severity.WARNING_NORMAL); + softly.assertThat(report.get(1).getMessage()).contains("ScrollView size validation"); } @Override diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/CodeNarcAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/CodeNarcAdapterTest.java index 25e878a0d..474015a73 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/CodeNarcAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/CodeNarcAdapterTest.java @@ -18,7 +18,7 @@ class CodeNarcAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(11); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(6)) .hasMessage("In most cases, exceptions should not be caught and ignored (swallowed).") .hasFileName("foo/bar/Test.groovy") .hasType("EmptyCatchBlock") diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapterTest.java index d6785548b..012a5710a 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/CppCheckAdapterTest.java @@ -83,19 +83,19 @@ void shouldFindMultipleLocationsWithSameId() { assertThat(report).hasSize(2); - assertThat(report.get(0)).hasFileName( - "apps/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp") + assertThat(report.get(0)) + .hasFileName("apps/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp") .hasLineStart(53) .hasMessage("Variable 'it' is reassigned a value before the old one has been used.") .hasType("redundantAssignment"); assertThat(report.get(0).getLineRanges()).isEqualTo(new LineRangeList(new LineRange(51))); - assertThat(report.get(1)).hasFileName( - "that/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp") - .hasLineStart(51) + assertThat(report.get(1)) + .hasFileName("that/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp") + .hasLineStart(53) .hasMessage("Variable 'that' is reassigned a value before the old one has been used.") .hasType("redundantAssignment"); - assertThat(report.get(1).getLineRanges()).isEqualTo(new LineRangeList(new LineRange(53))); + assertThat(report.get(1).getLineRanges()).isEqualTo(new LineRangeList(new LineRange(51))); } @Override diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapterTest.java index 6a17241c9..063ef71dc 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapterTest.java @@ -23,23 +23,23 @@ class DocFxAdapterTest extends AbstractParserTest { protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(3); softly.assertThat(report.get(0)) - .hasMessage("Invalid file link:(~/missing.md#mobiilisovellus).") - .hasFileName("sanasto.md") - .hasType("InvalidFileLink") - .hasLineStart(63) - .hasSeverity(Severity.WARNING_NORMAL); - softly.assertThat(report.get(1)) .hasMessage("Invalid file link:(~/mobiilirajapinta/puuttuu.md).") .hasFileName("mobiilirajapinta/json-dateandtime.md") .hasType("InvalidFileLink") .hasLineStart(18) .hasSeverity(Severity.WARNING_NORMAL); - softly.assertThat(report.get(2)) + softly.assertThat(report.get(1)) .hasMessage("Invalid file link:(~/mobiilirajapinta/joopajoo.md).") .hasFileName("mobiilirajapinta/json-nimeämiskäytäntö.md") .hasType("InvalidFileLink") .hasLineStart(7) .hasSeverity(Severity.WARNING_NORMAL); + softly.assertThat(report.get(2)) + .hasMessage("Invalid file link:(~/missing.md#mobiilisovellus).") + .hasFileName("sanasto.md") + .hasType("InvalidFileLink") + .hasLineStart(63) + .hasSeverity(Severity.WARNING_NORMAL); } @Override diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/Flake8AdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/Flake8AdapterTest.java index 0c9278568..a41659a63 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/Flake8AdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/Flake8AdapterTest.java @@ -22,7 +22,7 @@ class Flake8AdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(12); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(3)) .hasMessage("'db' imported but unused") .hasFileName("myproject/__init__.py") .hasType("F401") @@ -45,7 +45,7 @@ void shouldParseFileWithColumns() { Report report = parse("flake8-issue53786"); assertThat(report).hasSize(9); - assertThat(report.get(0)).hasFileName("../devopsloft/application.py") + assertThat(report.get(8)).hasFileName("../devopsloft/application.py") .hasLineStart(42) .hasColumnStart(1) .hasType("E302") @@ -59,15 +59,15 @@ void shouldParseWithCurrentDirPrefix() { assertThat(report).hasSize(2); try (SoftAssertions softly = new SoftAssertions()) { softly.assertThat(report.get(0)).hasFileName("./src/init.py") - .hasLineStart(66) - .hasColumnStart(121) - .hasType("E501") - .hasMessage("line too long (143 > 120 characters)"); - softly.assertThat(report.get(1)).hasFileName("./src/init.py") .hasLineStart(254) .hasColumnStart(58) .hasType("W292") .hasMessage("no newline at end of file"); + softly.assertThat(report.get(1)).hasFileName("./src/init.py") + .hasLineStart(66) + .hasColumnStart(121) + .hasType("E501") + .hasMessage("line too long (143 > 120 characters)"); } } } diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/JsHintAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/JsHintAdapterTest.java index 83ce23e46..84050dcd8 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/JsHintAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/JsHintAdapterTest.java @@ -18,7 +18,7 @@ class JsHintAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(6); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(2)) .hasMessage("Use '===' to compare with 'null'.: if (a == null)") .hasFileName("../../../web/js-file.js") .hasLineStart(4) diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/MyPyAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/MyPyAdapterTest.java index 0668d36f9..0847d6371 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/MyPyAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/MyPyAdapterTest.java @@ -18,12 +18,12 @@ class MyPyAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(5); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(3)) .hasMessage("\"LogRecord\" has no attribute \"user_uuid\"") .hasFileName("fs/cs/backend/log.py") .hasLineStart(16) .hasSeverity(Severity.WARNING_HIGH); - softly.assertThat(report.get(1)) + softly.assertThat(report.get(2)) .hasMessage("\"LogRecord\" has no attribute \"tenant_id\"") .hasFileName("fs/cs/backend/log.py") .hasLineStart(17) diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/PitAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/PitAdapterTest.java index b613a29ba..13bdb06a2 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/PitAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/PitAdapterTest.java @@ -19,21 +19,19 @@ class PitAdapterTest extends AbstractParserTest { protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(2); softly.assertThat(report.get(0)) - .hasMessage( - "NO_COVERAGE, org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator, (Ljava/util/stream/Stream;)V") - .hasFileName("edu/hm/hafner/analysis/Issues.java") - .hasCategory("NO_COVERAGE") - .hasType("org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator") - .hasLineStart(110) - .hasSeverity(Severity.WARNING_NORMAL); - softly.assertThat(report.get(1)) - .hasMessage( - "SURVIVED, org.pitest.mutationtest.engine.gregor.mutators.MathMutator, (Ledu/hm/hafner/analysis/Issues;Ledu/hm/hafner/analysis/Issues;)V") + .hasMessage("SURVIVED, org.pitest.mutationtest.engine.gregor.mutators.MathMutator, (Ledu/hm/hafner/analysis/Issues;Ledu/hm/hafner/analysis/Issues;)V") .hasCategory("SURVIVED") .hasType("org.pitest.mutationtest.engine.gregor.mutators.MathMutator") .hasFileName("edu/hm/hafner/analysis/Issues.java") .hasLineStart(503) .hasSeverity(Severity.WARNING_HIGH); + softly.assertThat(report.get(1)) + .hasMessage("NO_COVERAGE, org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator, (Ljava/util/stream/Stream;)V") + .hasFileName("edu/hm/hafner/analysis/Issues.java") + .hasCategory("NO_COVERAGE") + .hasType("org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator") + .hasLineStart(110) + .hasSeverity(Severity.WARNING_NORMAL); } @Override diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/PyDocStyleAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/PyDocStyleAdapterTest.java index 5a7aab3e6..4f87dedbe 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/PyDocStyleAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/PyDocStyleAdapterTest.java @@ -18,7 +18,7 @@ class PyDocStyleAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(33); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(31)) .hasMessage("Missing docstring in public module") .hasFileName("fs/csm/admin_api/ui_api.py") .hasLineStart(1) diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/ResharperInspectCodeAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/ResharperInspectCodeAdapterTest.java index c94e57794..c239a343b 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/ResharperInspectCodeAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/ResharperInspectCodeAdapterTest.java @@ -1,9 +1,6 @@ package edu.hm.hafner.analysis.parser.violations; -import java.util.Iterator; - import edu.hm.hafner.analysis.AbstractParserTest; -import edu.hm.hafner.analysis.Issue; import edu.hm.hafner.analysis.Report; import edu.hm.hafner.analysis.Severity; import edu.hm.hafner.analysis.assertions.SoftAssertions; @@ -27,17 +24,14 @@ class ResharperInspectCodeAdapterTest extends AbstractParserTest { protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { assertThat(report).hasSize(3); - Iterator iterator = report.iterator(); - - softly.assertThat(iterator.next()) - .hasLineStart(16) - .hasLineEnd(16) - .hasMessage("Cannot resolve symbol 'GetError'. C# Compiler Errors. CSharpErrors") + softly.assertThat(report.get(0)) + .hasLineStart(41) + .hasLineEnd(41) + .hasMessage("Convert to auto-property. Language Usage Opportunities. Convert property to auto-property") .hasFileName("ResharperDemo/Program.cs") - .hasType("CSharpErrors") - .hasSeverity(Severity.WARNING_HIGH); - - softly.assertThat(iterator.next()) + .hasType("ConvertToAutoProperty") + .hasSeverity(Severity.WARNING_LOW); + softly.assertThat(report.get(1)) .hasLineStart(23) .hasLineEnd(23) .hasMessage( @@ -45,14 +39,15 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti .hasFileName("ResharperDemo/Program.cs") .hasType("ConditionIsAlwaysTrueOrFalse") .hasSeverity(Severity.WARNING_NORMAL); - - softly.assertThat(iterator.next()) - .hasLineStart(41) - .hasLineEnd(41) - .hasMessage("Convert to auto-property. Language Usage Opportunities. Convert property to auto-property") + softly.assertThat(report.get(2)) + .hasLineStart(16) + .hasLineEnd(16) + .hasMessage("Cannot resolve symbol 'GetError'. C# Compiler Errors. CSharpErrors") .hasFileName("ResharperDemo/Program.cs") - .hasType("ConvertToAutoProperty") - .hasSeverity(Severity.WARNING_LOW); + .hasType("CSharpErrors") + .hasSeverity(Severity.WARNING_HIGH); + + } @Override diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/XmlLintAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/XmlLintAdapterTest.java index 7a15a1eb4..7da413921 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/XmlLintAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/XmlLintAdapterTest.java @@ -18,7 +18,7 @@ class XmlLintAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(3); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(2)) .hasMessage("Opening and ending tag mismatch: font line 4 and body") .hasFileName("xml/other.xml") .hasLineStart(5) diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/YamlLintAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/YamlLintAdapterTest.java index 3222346eb..819c04d49 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/YamlLintAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/YamlLintAdapterTest.java @@ -18,7 +18,7 @@ class YamlLintAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(4); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(2)) .hasMessage("missing starting space in comment") .hasFileName("file.yml") .hasLineStart(6) diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/ZptLintAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/ZptLintAdapterTest.java index 8581097e7..8824722b0 100644 --- a/src/test/java/edu/hm/hafner/analysis/parser/violations/ZptLintAdapterTest.java +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/ZptLintAdapterTest.java @@ -18,7 +18,7 @@ class ZptLintAdapterTest extends AbstractParserTest { @Override protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { softly.assertThat(report).hasSize(2); - softly.assertThat(report.get(0)) + softly.assertThat(report.get(1)) .hasMessage("abc def ghe '\" 123") .hasFileName("cpplint.py") .hasLineStart(4796)