allow INFO and BLOCKER for CCT rule quality severity to support Multi-Quality Rule mode
This commit is contained in:
parent
2a2c8c536b
commit
47956ba750
@ -40,6 +40,6 @@ You can update the quickfix field using this GitHub Workflow: https://github.com
|
||||
|
||||
The code field is an object that contains information related to the clean code taxonomy. It is an object with two required properties:
|
||||
|
||||
* `impacts`: A nested object that is treated as a mapping from a software quality to a level (`"LOW"`, `"MEDIUM"` or `"HIGH"`). Note that at least one software quality has to be specified. The current list of allowed software qualities is `"MAINTAINABILITY"`, `"RELIABILITY"` and `"SECURITY"`.
|
||||
* `impacts`: A nested object that is treated as a mapping from a software quality to a level (`"INFO"`, `"LOW"`, `"MEDIUM"`, `"HIGH"` or `"BLOCKER"`). Note that at least one software quality has to be specified. The current list of allowed software qualities is `"MAINTAINABILITY"`, `"RELIABILITY"` and `"SECURITY"`.
|
||||
|
||||
* `attribute`: A single clean code attribute that the rule aims to achieve. This has to be one of the following values: `"FORMATTED"`, `"CONVENTIONAL"`, `"IDENTIFIABLE"`, `"CLEAR"`, `"LOGICAL"`, `"COMPLETE"`, `"EFFICIENT"`, `"FOCUSED"`, `"DISTINCT"`, `"MODULAR"`, `"TESTED"`, `"LAWFUL"`, `"TRUSTWORTHY"`, `"RESPECTFUL"`.
|
||||
|
@ -267,15 +267,15 @@
|
||||
"properties": {
|
||||
"MAINTAINABILITY": {
|
||||
"type": "string",
|
||||
"enum": ["LOW", "MEDIUM", "HIGH"]
|
||||
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
|
||||
},
|
||||
"RELIABILITY": {
|
||||
"type": "string",
|
||||
"enum": ["LOW", "MEDIUM", "HIGH"]
|
||||
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
|
||||
},
|
||||
"SECURITY": {
|
||||
"type": "string",
|
||||
"enum": ["LOW", "MEDIUM", "HIGH"]
|
||||
"enum": ["INFO", "LOW", "MEDIUM", "HIGH", "BLOCKER"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ def test_rule_with_invalid_impacts(invalid_rules: RulesRepository):
|
||||
|
||||
def test_rule_with_invalid_impact_level(invalid_rules: RulesRepository):
|
||||
s506 = invalid_rules.get_rule('S506')
|
||||
with pytest.raises(RuleValidationError, match=re.escape("Rule S506 failed validation for these reasons:\n - Rule scala:S506 has invalid metadata in MAINTAINABILITY: 'INVALID' is not one of ['LOW', 'MEDIUM', 'HIGH']")):
|
||||
with pytest.raises(RuleValidationError, match=re.escape("Rule S506 failed validation for these reasons:\n - Rule scala:S506 has invalid metadata in MAINTAINABILITY: 'INVALID' is not one of ['INFO', 'LOW', 'MEDIUM', 'HIGH', 'BLOCKER']")):
|
||||
validate_rule_metadata(s506)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user