Skip to content

Commit

Permalink
Add checks and warnings for use of full_access (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Feb 17, 2021
1 parent c352e6c commit ccd0e25
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ def is_default(validator, properties, instance, schema):
print(f"::error file={config}::'ports' and 'ports_description' do not match.")
exit_code = 1

if configuration.get("full_access") and any(
item in ["devices", "gpio", "uart", "usb"] for item in configuration
):
print(
f"::error file={config}::'full_access', don't add 'devices', 'uart', 'usb' or 'gpio' this is not needed".
)
exit_code = 1

if configuration.get("full_access"):
print(
f"::warning file={config}::'full_access' consider using other options instead, like 'devices'".
)

if "auto_uart" in configuration:
print(f"::error file={config}::'auto_uart' is deprecated, use 'uart' instead.")
exit_code = 1
Expand Down

0 comments on commit ccd0e25

Please sign in to comment.