From 87b174962880b8bb0433821e1a9e7daceaf91896 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 17 Sep 2023 00:35:11 +0200 Subject: [PATCH] Create rule S6778: Showcase RSPEC with 2 frameworks --- rules/S6778/java/metadata.json | 25 +++++++++++++++++ rules/S6778/java/rule.adoc | 51 ++++++++++++++++++++++++++++++++++ rules/S6778/metadata.json | 2 ++ 3 files changed, 78 insertions(+) create mode 100644 rules/S6778/java/metadata.json create mode 100644 rules/S6778/java/rule.adoc create mode 100644 rules/S6778/metadata.json diff --git a/rules/S6778/java/metadata.json b/rules/S6778/java/metadata.json new file mode 100644 index 00000000000..281d58ea96b --- /dev/null +++ b/rules/S6778/java/metadata.json @@ -0,0 +1,25 @@ +{ + "title": "This is a rule showcasing a rule with mutliple frameworks", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + ], + "defaultSeverity": "Major", + "ruleSpecification": "RSPEC-6778", + "sqKey": "S6778", + "scope": "All", + "defaultQualityProfiles": ["Sonar way"], + "quickfix": "unknown", + "code": { + "impacts": { + "MAINTAINABILITY": "HIGH", + "RELIABILITY": "MEDIUM", + "SECURITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } +} diff --git a/rules/S6778/java/rule.adoc b/rules/S6778/java/rule.adoc new file mode 100644 index 00000000000..b2eede33def --- /dev/null +++ b/rules/S6778/java/rule.adoc @@ -0,0 +1,51 @@ +FIXME: add a description + +// If you want to factorize the description uncomment the following line and create the file. +//include::../description.adoc[] + +== Why is this an issue? + +This rule is not really a rule, but a demonstration of the features from Asciidoc that can appear in a rule description. + +More specifically, its "How to fix it" section contains several frameworks. + + +== How to fix it in Razor + +=== Code examples + +Some text for the Razor framework. Should be displayed in its own subtab. + +==== Noncompliant code example + +[source,text,diff-id=1,diff-type=noncompliant] +---- +FIXME +---- + +==== Compliant solution + +[source,text,diff-id=1,diff-type=compliant] +---- +FIXED +---- + +== How to fix it in Python Standard Library + +=== Code examples + +Some text for the Python Standard Library framework. Should be displayed in its own subtab. + +==== Noncompliant code example + +[source,text,diff-id=2,diff-type=noncompliant] +---- +FIXME +---- + +==== Compliant solution + +[source,text,diff-id=2,diff-type=compliant] +---- +FIXED +---- diff --git a/rules/S6778/metadata.json b/rules/S6778/metadata.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/rules/S6778/metadata.json @@ -0,0 +1,2 @@ +{ +}