Add back common rule S1482 and change the status to closed

This commit is contained in:
Čaba Šagi 2022-08-12 00:01:07 +02:00 committed by GitHub
parent f6a64c41de
commit 28e8afa71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 271 additions and 0 deletions

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

4
rules/S1482/message.adoc Normal file
View File

@ -0,0 +1,4 @@
=== Message
Add tests to cover this branch.

29
rules/S1482/metadata.json Normal file
View File

@ -0,0 +1,29 @@
{
"title": "Branches should have sufficient coverage by unit tests",
"type": "CODE_SMELL",
"status": "closed",
"remediation": {
"func": "Linear",
"linearDesc": "per uncovered condition",
"linearFactor": "5min"
},
"tags": [
"bad-practice"
],
"extra": {
"replacementRules": [
],
"legacyKeys": [
"InsufficientBranchCoverage"
]
},
"defaultSeverity": "Critical",
"ruleSpecification": "RSPEC-1482",
"sqKey": "S1482",
"scope": "Main",
"defaultQualityProfiles": [
],
"quickfix": "unknown"
}

View File

@ -0,0 +1,11 @@
=== Parameters
.minimumBranchCoverageRatio
****
----
65.0
----
The minimum required branch coverage ratio.
****

View File

@ -0,0 +1,3 @@
{
}

12
rules/S1482/php/rule.adoc Normal file
View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

12
rules/S1482/pli/rule.adoc Normal file
View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

12
rules/S1482/rpg/rule.adoc Normal file
View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

2
rules/S1482/rule.adoc Normal file
View File

@ -0,0 +1,2 @@
An issue is created on a file as soon as the branch coverage on this file is less than the required threshold. It gives the number of branches to be covered in order to reach the required threshold.

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

12
rules/S1482/vb6/rule.adoc Normal file
View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,12 @@
include::../rule.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]