diff --git a/docs/metadata.adoc b/docs/metadata.adoc index a34fcd15c8..7d175bcb4a 100644 --- a/docs/metadata.adoc +++ b/docs/metadata.adoc @@ -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"`. diff --git a/rspec-tools/rspec_tools/validation/rule-metadata-schema.json b/rspec-tools/rspec_tools/validation/rule-metadata-schema.json index 212818f5c7..18fceff5ee 100644 --- a/rspec-tools/rspec_tools/validation/rule-metadata-schema.json +++ b/rspec-tools/rspec_tools/validation/rule-metadata-schema.json @@ -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"] } } }, diff --git a/rspec-tools/tests/validation/test_metadata_validation.py b/rspec-tools/tests/validation/test_metadata_validation.py index 87d25427d5..e525b39d67 100644 --- a/rspec-tools/tests/validation/test_metadata_validation.py +++ b/rspec-tools/tests/validation/test_metadata_validation.py @@ -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)