-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create rule S6778: Showcase RSPEC with 2 frameworks
- Loading branch information
1 parent
fddd267
commit 87b1749
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |