From 19422b36babe464416504198ea8ee73e86820905 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 11:10:57 +0100 Subject: [PATCH 1/6] Add support for SARIF. Static Analysis Results Interchange Format (SARIF). --- SUPPORTED-FORMATS.md | 18 ++- .../parser/violations/SarifAdapter.java | 17 +++ .../analysis/registry/ParserRegistry.java | 1 + .../analysis/registry/SarifDescriptor.java | 33 +++++ .../parser/violations/SarifAdapterTest.java | 34 +++++ .../analysis/parser/violations/sarif.json | 118 ++++++++++++++++++ 6 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java create mode 100644 src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java create mode 100644 src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java create mode 100644 src/test/resources/edu/hm/hafner/analysis/parser/violations/sarif.json diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index 113e418d6..6d540a6e7 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. @@ -1651,6 +1651,22 @@ analyze - iccxxxxcompiler_opts cstat2.cFor details check the IAR C- :bulb: Use commandline rubocop --format progress. + + + sarif + + + - + + + + SARIF + + + + **/sonar-report.json + + sunc diff --git a/src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java b/src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java new file mode 100644 index 000000000..b8faf2c9d --- /dev/null +++ b/src/main/java/edu/hm/hafner/analysis/parser/violations/SarifAdapter.java @@ -0,0 +1,17 @@ +package edu.hm.hafner.analysis.parser.violations; + +import se.bjurr.violations.lib.parsers.SarifParser; + +/** + * Parses SARIF files. + * + * @author Ullrich Hafner + */ +public class SarifAdapter extends AbstractViolationAdapter { + private static final long serialVersionUID = -5699747899173867285L; + + @Override + SarifParser createParser() { + return new SarifParser(); + } +} diff --git a/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java b/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java index 0a90d7445..696e6b4c4 100644 --- a/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java +++ b/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java @@ -131,6 +131,7 @@ public class ParserRegistry { new RfLintDescriptor(), new RoboCopyDescriptor(), new RuboCopDescriptor(), + new SarifDescriptor(), new ScalaDescriptor(), new SimianDescriptor(), new SonarQubeDescriptor(), diff --git a/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java b/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java new file mode 100644 index 000000000..05a7c90a3 --- /dev/null +++ b/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java @@ -0,0 +1,33 @@ +package edu.hm.hafner.analysis.registry; + +import edu.hm.hafner.analysis.IssueParser; +import edu.hm.hafner.analysis.parser.violations.SarifAdapter; + +/** + * A descriptor for the SARIF parser. + * + * @author Ullrich Hafner + */ +class SarifDescriptor extends ParserDescriptor { + private static final String ID = "sarif"; + private static final String NAME = "SARIF"; + + SarifDescriptor() { + super(ID, NAME); + } + + @Override + public IssueParser createParser(final Option... options) { + return new SarifAdapter(); + } + + @Override + public String getPattern() { + return "**/sonar-report.json"; + } + + @Override + public String getUrl() { + return "https://github.com/oasis-tcs/sarif-spec"; + } +} 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 new file mode 100644 index 000000000..c7e316277 --- /dev/null +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/SarifAdapterTest.java @@ -0,0 +1,34 @@ +package edu.hm.hafner.analysis.parser.violations; + +import edu.hm.hafner.analysis.AbstractParserTest; +import edu.hm.hafner.analysis.Report; +import edu.hm.hafner.analysis.Severity; +import edu.hm.hafner.analysis.assertions.SoftAssertions; + +/** + * Tests the class {@link SarifAdapter}. + * + * @author Ullrich Hafner + */ +class SarifAdapterTest extends AbstractParserTest { + SarifAdapterTest() { + super("sarif.json"); + } + + @Override + protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { + softly.assertThat(report).hasSize(2); + softly.assertThat(report.get(0)) + .hasMessage("asdasd asdasd") + .hasFileName("/whatever/path.c") + .hasLineStart(123) + .hasType("Cyclomatic complexity") + .hasSeverity(Severity.WARNING_HIGH); + } + + @Override + protected SarifAdapter createParser() { + return new SarifAdapter(); + } + +} diff --git a/src/test/resources/edu/hm/hafner/analysis/parser/violations/sarif.json b/src/test/resources/edu/hm/hafner/analysis/parser/violations/sarif.json new file mode 100644 index 000000000..c3ad178a5 --- /dev/null +++ b/src/test/resources/edu/hm/hafner/analysis/parser/violations/sarif.json @@ -0,0 +1,118 @@ +{ + "runs": [ + { + "invocations": [], + "language": "en-US", + "versionControlProvenance": [], + "artifacts": [], + "logicalLocations": [], + "graphs": [], + "results": [ + { + "ruleId": "", + "ruleIndex": -1, + "kind": "FAIL", + "level": "NONE", + "message": { + "text": "asdasd", + "arguments": [] + }, + "locations": [ + { + "id": -1, + "physicalLocation": { + "artifactLocation": { + "uri": "/whatever/path.c", + "index": -1 + }, + "region": { + "startLine": 123, + "endLine": 123, + "charOffset": -1, + "byteOffset": -1, + "message": { + "text": "asdasd", + "arguments": [] + } + } + }, + "logicalLocations": [], + "annotations": [], + "relationships": [] + } + ], + "stacks": [], + "codeFlows": [], + "graphs": [], + "graphTraversals": [], + "relatedLocations": [], + "suppressions": [], + "rank": -1.0, + "attachments": [], + "workItemUris": [], + "fixes": [], + "taxa": [] + }, + { + "ruleId": "Cyclomatic complexity", + "ruleIndex": -1, + "kind": "FAIL", + "level": "ERROR", + "message": { + "text": "asdasd", + "arguments": [] + }, + "locations": [ + { + "id": -1, + "physicalLocation": { + "artifactLocation": { + "uri": "/whatever/path.c", + "index": -1 + }, + "region": { + "startLine": 123, + "endLine": 123, + "charOffset": -1, + "byteOffset": -1, + "message": { + "text": "asdasd", + "arguments": [] + } + } + }, + "logicalLocations": [], + "annotations": [], + "relationships": [] + } + ], + "stacks": [], + "codeFlows": [], + "graphs": [], + "graphTraversals": [], + "relatedLocations": [], + "suppressions": [], + "rank": -1.0, + "attachments": [], + "workItemUris": [], + "fixes": [], + "taxa": [] + } + ], + "runAggregates": [], + "redactionTokens": [], + "newlineSequences": [ + "\r\n", + "\n" + ], + "threadFlowLocations": [], + "taxonomies": [], + "addresses": [], + "translations": [], + "policies": [], + "webRequests": [], + "webResponses": [] + } + ], + "inlineExternalProperties": [] +} From 01f80c40a49758b4065274f51b3e6a2b03cba16c Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 10:28:51 +0100 Subject: [PATCH 2/6] Add support for Dart analyze. --- SUPPORTED-FORMATS.md | 34 ++++++++--------- .../violations/AbstractViolationAdapter.java | 1 + .../violations/DartAnalyzeParserAdapter.java | 17 +++++++++ .../registry/DartAnalyzeDescriptor.java | 28 ++++++++++++++ .../analysis/registry/ParserRegistry.java | 1 + .../DartAnalyzeParserAdapterTest.java | 37 +++++++++++++++++++ .../analysis/parser/violations/dart.log | 9 +++++ 7 files changed, 110 insertions(+), 17 deletions(-) create mode 100644 src/main/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapter.java create mode 100644 src/main/java/edu/hm/hafner/analysis/registry/DartAnalyzeDescriptor.java create mode 100644 src/test/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapterTest.java create mode 100644 src/test/resources/edu/hm/hafner/analysis/parser/violations/dart.log diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index 6d540a6e7..b7bdf4f73 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. @@ -461,6 +461,22 @@ If your tool is supported, but some properties are missing (icon, URL, etc.), pl **/dscanner-report.json + + + dart + + + - + + + + Dart Analyze + + + + - + + detekt @@ -1651,22 +1667,6 @@ analyze - iccxxxxcompiler_opts cstat2.cFor details check the IAR C- :bulb: Use commandline rubocop --format progress. - - - sarif - - - - - - - - SARIF - - - - **/sonar-report.json - - sunc 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 f9a63771c..5a352a0ef 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 @@ -129,6 +129,7 @@ void updateIssueBuilder(final Violation violation, final IssueBuilder builder) { .setLineStart(violation.getStartLine()) .setLineEnd(violation.getEndLine()) .setColumnStart(violation.getColumn()) + .setColumnEnd(violation.getEndColumn()) .setType(violation.getRule()) .setCategory(violation.getCategory()); } diff --git a/src/main/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapter.java b/src/main/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapter.java new file mode 100644 index 000000000..1d9249540 --- /dev/null +++ b/src/main/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapter.java @@ -0,0 +1,17 @@ +package edu.hm.hafner.analysis.parser.violations; + +import se.bjurr.violations.lib.parsers.MachineParser; + +/** + * Parses Dart Analyze logger messages. + * + * @author Ullrich Hafner + */ +public class DartAnalyzeParserAdapter extends AbstractViolationAdapter { + private static final long serialVersionUID = 50827863228591461L; + + @Override + MachineParser createParser() { + return new MachineParser(); + } +} diff --git a/src/main/java/edu/hm/hafner/analysis/registry/DartAnalyzeDescriptor.java b/src/main/java/edu/hm/hafner/analysis/registry/DartAnalyzeDescriptor.java new file mode 100644 index 000000000..3b86780d8 --- /dev/null +++ b/src/main/java/edu/hm/hafner/analysis/registry/DartAnalyzeDescriptor.java @@ -0,0 +1,28 @@ +package edu.hm.hafner.analysis.registry; + +import edu.hm.hafner.analysis.IssueParser; +import edu.hm.hafner.analysis.parser.violations.DartAnalyzeParserAdapter; + +/** + * A descriptor for the Dart analyze parser. + * + * @author Ullrich Hafner + */ +class DartAnalyzeDescriptor extends ParserDescriptor { + private static final String ID = "dart"; + private static final String NAME = "Dart Analyze"; + + DartAnalyzeDescriptor() { + super(ID, NAME); + } + + @Override + public IssueParser createParser(final Option... options) { + return new DartAnalyzeParserAdapter(); + } + + @Override + public String getUrl() { + return "https://dart.dev/"; + } +} diff --git a/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java b/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java index 696e6b4c4..e677de8e5 100644 --- a/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java +++ b/src/main/java/edu/hm/hafner/analysis/registry/ParserRegistry.java @@ -56,6 +56,7 @@ public class ParserRegistry { new CppCheckDescriptor(), new CppLintDescriptor(), new CssLintDescriptor(), + new DartAnalyzeDescriptor(), new DetektDescriptor(), new DiabCDescriptor(), new DocFxDescriptor(), diff --git a/src/test/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapterTest.java b/src/test/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapterTest.java new file mode 100644 index 000000000..2f3155965 --- /dev/null +++ b/src/test/java/edu/hm/hafner/analysis/parser/violations/DartAnalyzeParserAdapterTest.java @@ -0,0 +1,37 @@ +package edu.hm.hafner.analysis.parser.violations; + +import edu.hm.hafner.analysis.AbstractParserTest; +import edu.hm.hafner.analysis.IssueParser; +import edu.hm.hafner.analysis.Report; +import edu.hm.hafner.analysis.Severity; +import edu.hm.hafner.analysis.assertions.SoftAssertions; + +/** + * Tests the class {@link DartAnalyzeParserAdapter}. + * + * @author Ullrich Hafner + */ +class DartAnalyzeParserAdapterTest extends AbstractParserTest { + DartAnalyzeParserAdapterTest() { + super("dart.log"); + } + + @Override + protected void assertThatIssuesArePresent(final Report report, final SoftAssertions softly) { + softly.assertThat(report).hasSize(6); + softly.assertThat(report.get(0)) + .hasMessage("The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'.") + .hasFileName("C:/Users/david/StudioProjects/bat/lib/step_test.dart") + .hasType("UNNECESSARY_IMPORT") + .hasCategory("HINT") + .hasLineStart(1) + .hasColumnStart(8) + .hasColumnEnd(32) + .hasSeverity(Severity.WARNING_LOW); + } + + @Override + protected IssueParser createParser() { + return new DartAnalyzeParserAdapter(); + } +} diff --git a/src/test/resources/edu/hm/hafner/analysis/parser/violations/dart.log b/src/test/resources/edu/hm/hafner/analysis/parser/violations/dart.log new file mode 100644 index 000000000..0daed9b2d --- /dev/null +++ b/src/test/resources/edu/hm/hafner/analysis/parser/violations/dart.log @@ -0,0 +1,9 @@ +# +# dart analyze --format=machine +# +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\step_test.dart|1|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\step_test_form.dart|1|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\step_test_perform.dart|3|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\walk_test.dart|1|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\walk_test_countdown.dart|3|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. +INFO|HINT|UNNECESSARY_IMPORT|C:\\Users\\david\\StudioProjects\\bat\\lib\\walk_test_perform.dart|3|8|32|The import of 'package:flutter/cupertino.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart'. From 4e2cb73a82d2d1e0cf0a8b374bfbc35f1eb5d29d Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 10:48:53 +0100 Subject: [PATCH 3/6] Gracefully ignore missing integer values in violations. --- SUPPORTED-FORMATS.md | 2 +- .../violations/AbstractViolationAdapter.java | 26 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index b7bdf4f73..2835215bf 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/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java b/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java index 5a352a0ef..ce0c381f3 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 @@ -11,6 +11,7 @@ import edu.hm.hafner.analysis.ReaderFactory; import edu.hm.hafner.analysis.Report; import edu.hm.hafner.analysis.Severity; +import edu.umd.cs.findbugs.annotations.CheckForNull; import se.bjurr.violations.lib.ViolationsLogger; import se.bjurr.violations.lib.model.SEVERITY; @@ -126,16 +127,31 @@ void updateIssueBuilder(final Violation violation, final IssueBuilder builder) { builder.setSeverity(convertSeverity(violation.getSeverity(), violation)) .setFileName(violation.getFile()) .setMessage(violation.getMessage()) - .setLineStart(violation.getStartLine()) - .setLineEnd(violation.getEndLine()) - .setColumnStart(violation.getColumn()) - .setColumnEnd(violation.getEndColumn()) + .setLineStart(defaultInteger(violation.getStartLine())) + .setLineEnd(defaultInteger(violation.getEndLine())) + .setColumnStart(defaultInteger(violation.getColumn())) + .setColumnEnd(defaultInteger(violation.getEndColumn())) .setType(violation.getRule()) .setCategory(violation.getCategory()); } /** - * Sub-classes may add additional {@link IssueBuilder} properties based on the content of the specified {@link + * Creates a default Integer representation for undefined input parameters. + * + * @param integer + * the integer to check + * + * @return the valid string or a default string if the specified string is not valid + */ + private int defaultInteger(@CheckForNull final Integer integer) { + if (integer == null) { + return 0; + } + return Math.max(integer, 0); + } + + /** + * Subclasses may add additional {@link IssueBuilder} properties based on the content of the specified {@link * Violation}. This default implementation is empty. * * @param builder From 1f65f1e88be566f72a6171efe3f39b78ebd8f9a4 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 10:52:32 +0100 Subject: [PATCH 4/6] Fix JavaDoc. --- src/main/java/edu/hm/hafner/analysis/Issue.java | 2 +- .../parser/violations/AbstractViolationAdapter.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/hm/hafner/analysis/Issue.java b/src/main/java/edu/hm/hafner/analysis/Issue.java index 045d22e17..931ebc6fb 100644 --- a/src/main/java/edu/hm/hafner/analysis/Issue.java +++ b/src/main/java/edu/hm/hafner/analysis/Issue.java @@ -415,7 +415,7 @@ private String normalizeFileName(@CheckForNull final String platformFileName) { * @param integer * the integer to check * - * @return the valid string or a default string if the specified string is not valid + * @return the valid integer value or 0 if the specified {@link Integer} is {@code null} or less than 0 */ private int defaultInteger(final int integer) { return Math.max(integer, 0); 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 ce0c381f3..2ce0d396f 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 @@ -127,10 +127,10 @@ void updateIssueBuilder(final Violation violation, final IssueBuilder builder) { builder.setSeverity(convertSeverity(violation.getSeverity(), violation)) .setFileName(violation.getFile()) .setMessage(violation.getMessage()) - .setLineStart(defaultInteger(violation.getStartLine())) - .setLineEnd(defaultInteger(violation.getEndLine())) - .setColumnStart(defaultInteger(violation.getColumn())) - .setColumnEnd(defaultInteger(violation.getEndColumn())) + .setLineStart(toValidInt(violation.getStartLine())) + .setLineEnd(toValidInt(violation.getEndLine())) + .setColumnStart(toValidInt(violation.getColumn())) + .setColumnEnd(toValidInt(violation.getEndColumn())) .setType(violation.getRule()) .setCategory(violation.getCategory()); } @@ -141,9 +141,9 @@ void updateIssueBuilder(final Violation violation, final IssueBuilder builder) { * @param integer * the integer to check * - * @return the valid string or a default string if the specified string is not valid + * @return the valid integer value or 0 if the specified {@link Integer} is {@code null} or less than 0 */ - private int defaultInteger(@CheckForNull final Integer integer) { + private int toValidInt(@CheckForNull final Integer integer) { if (integer == null) { return 0; } From 7a85398c38ad4e2482eadac4a31ca73d3620afe4 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 14:12:52 +0100 Subject: [PATCH 5/6] Add Sarif to SUPPORTED-FORMATS.md. --- SUPPORTED-FORMATS.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index 2835215bf..d1a579f9c 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. @@ -1667,6 +1667,22 @@ analyze - iccxxxxcompiler_opts cstat2.cFor details check the IAR C- :bulb: Use commandline rubocop --format progress. + + + sarif + + + - + + + + SARIF + + + + **/sonar-report.json + + sunc From b6abdf49c19469727c246494789b257ff8779914 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 17 Dec 2021 14:16:42 +0100 Subject: [PATCH 6/6] Remove pattern for SARIF. --- SUPPORTED-FORMATS.md | 4 ++-- .../edu/hm/hafner/analysis/registry/SarifDescriptor.java | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index d1a579f9c..bcc3f4c92 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. @@ -1680,7 +1680,7 @@ analyze - iccxxxxcompiler_opts cstat2.cFor details check the IAR C- - **/sonar-report.json + - diff --git a/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java b/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java index 05a7c90a3..70b5fc739 100644 --- a/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java +++ b/src/main/java/edu/hm/hafner/analysis/registry/SarifDescriptor.java @@ -21,11 +21,6 @@ public IssueParser createParser(final Option... options) { return new SarifAdapter(); } - @Override - public String getPattern() { - return "**/sonar-report.json"; - } - @Override public String getUrl() { return "https://github.com/oasis-tcs/sarif-spec";