From 24f7bae5f260c7b4417e0b21d4f742ca916b2349 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 29 Nov 2024 03:32:01 +0100 Subject: [PATCH] Add documentation URL to quality_scale hassfest validation (#131879) * Add documentation URL to quality_scale hassfest validation * Adjust --- script/hassfest/quality_scale.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script/hassfest/quality_scale.py b/script/hassfest/quality_scale.py index 1a665df19f5..543bf616952 100644 --- a/script/hassfest/quality_scale.py +++ b/script/hassfest/quality_scale.py @@ -104,6 +104,12 @@ SCALE_RULES = { 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 = [ "abode", "accuweather", @@ -1367,6 +1373,7 @@ def validate_iqs_file(config: Config, integration: Integration) -> None: ): for error in errors: 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 # quality scale, and all the rules below.