Add documentation URL to quality_scale hassfest validation (#131879)
* Add documentation URL to quality_scale hassfest validation * Adjustpull/131885/merge
parent
8e12fbff88
commit
24f7bae5f2
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue