Add documentation URL to quality_scale hassfest validation (#131879)

* Add documentation URL to quality_scale hassfest validation

* Adjust
pull/131885/merge
epenet 2024-11-29 03:32:01 +01:00 committed by GitHub
parent 8e12fbff88
commit 24f7bae5f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,12 @@ SCALE_RULES = {
VALIDATORS = {rule.name: rule.validator for rule in ALL_RULES if rule.validator} VALIDATORS = {rule.name: rule.validator for rule in ALL_RULES if rule.validator}
RULE_URL = (
"Please check the documentation at "
"https://developers.home-assistant.io/docs/core/"
"integration-quality-scale/rules/{rule_name}/"
)
INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
"abode", "abode",
"accuweather", "accuweather",
@ -1367,6 +1373,7 @@ def validate_iqs_file(config: Config, integration: Integration) -> None:
): ):
for error in errors: for error in errors:
integration.add_error("quality_scale", f"[{rule_name}] {error}") integration.add_error("quality_scale", f"[{rule_name}] {error}")
integration.add_error("quality_scale", RULE_URL.format(rule_name=rule_name))
# An integration must have all the necessary rules for the declared # An integration must have all the necessary rules for the declared
# quality scale, and all the rules below. # quality scale, and all the rules below.