Skip to content

Commit

Permalink
Create rule S6778: Showcase RSPEC with 2 frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 16, 2023
1 parent fddd267 commit 87b1749
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
25 changes: 25 additions & 0 deletions rules/S6778/java/metadata.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
51 changes: 51 additions & 0 deletions rules/S6778/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -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
----
2 changes: 2 additions & 0 deletions rules/S6778/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}

0 comments on commit 87b1749

Please sign in to comment.