Validate component usage (#23037)
* Update manifest validator * Update circle * Update text * Typo * fix link to codeowners * Merge CODEOWNERS into hassfest * Annotate errors with fixable * Convert error to warning * Lint * Make abs path * Python 3.5... * Typo * Fix tests
This commit is contained in:
parent
fc481133e7
commit
e8343452cd
19 changed files with 415 additions and 220 deletions
15
script/hassfest/manifest_helper.py
Normal file
15
script/hassfest/manifest_helper.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Helpers to deal with manifests."""
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
|
||||
component_dir = pathlib.Path('homeassistant/components')
|
||||
|
||||
|
||||
def iter_manifests():
|
||||
"""Iterate over all available manifests."""
|
||||
manifests = [
|
||||
json.loads(fil.read_text())
|
||||
for fil in component_dir.glob('*/manifest.json')
|
||||
]
|
||||
return sorted(manifests, key=lambda man: man['domain'])
|
Loading…
Add table
Add a link
Reference in a new issue