mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Exclude gold and platinum integrations from .coveragerc (#117563)
This commit is contained in:
parent
a8fba691ee
commit
6a10e89f6d
@ -729,7 +729,6 @@ omit =
|
||||
homeassistant/components/lookin/sensor.py
|
||||
homeassistant/components/loqed/sensor.py
|
||||
homeassistant/components/luci/device_tracker.py
|
||||
homeassistant/components/luftdaten/sensor.py
|
||||
homeassistant/components/lupusec/__init__.py
|
||||
homeassistant/components/lupusec/alarm_control_panel.py
|
||||
homeassistant/components/lupusec/binary_sensor.py
|
||||
|
@ -19,6 +19,7 @@ DONT_IGNORE = (
|
||||
"recorder.py",
|
||||
"scene.py",
|
||||
)
|
||||
FORCE_COVERAGE = ("gold", "platinum")
|
||||
|
||||
CORE_PREFIX = """# Sorted by hassfest.
|
||||
#
|
||||
@ -105,6 +106,14 @@ def validate(integrations: dict[str, Integration], config: Config) -> None:
|
||||
|
||||
integration = integrations[integration_path.name]
|
||||
|
||||
if integration.quality_scale in FORCE_COVERAGE:
|
||||
integration.add_error(
|
||||
"coverage",
|
||||
f"has quality scale {integration.quality_scale} and "
|
||||
"should not be present in .coveragerc file",
|
||||
)
|
||||
continue
|
||||
|
||||
if (last_part := path.parts[-1]) in {"*", "const.py"} and Path(
|
||||
f"tests/components/{integration.domain}/__init__.py"
|
||||
).exists():
|
||||
@ -112,6 +121,7 @@ def validate(integrations: dict[str, Integration], config: Config) -> None:
|
||||
"coverage",
|
||||
f"has tests and should not use {last_part} in .coveragerc file",
|
||||
)
|
||||
continue
|
||||
|
||||
for check in DONT_IGNORE:
|
||||
if path.parts[-1] not in {"*", check}:
|
||||
|
Loading…
x
Reference in New Issue
Block a user