INNER CODE UNIT · Python
_check_domain
magicsword-io/LOLRMM · bin/lint_content.py:155
def _check_domain(file: str, idx_path: str, value: object) -> Iterable[Finding]:
"""Yield findings for a single Domains entry."""
if not isinstance(value, str):
yield Finding(
ERROR, file, idx_path, repr(value),
"domain-not-string",
"Domains entries must be strings",
"wrap the value in quotes or restructure the list",
)
return
raw = value
stripped = raw.strip()
if raw != stripped:
yield Finding(
ERROR, file, idx_path, raw,
"domain-whitespace",