frenck / action-addon-linter Goto Github PK
View Code? Open in Web Editor NEW๐ Frenck's GitHub Action for linting Home Assistant Add-ons.
License: MIT License
๐ Frenck's GitHub Action for linting Home Assistant Add-ons.
License: MIT License
As my addon is a little bit dirty made, I need to supply the image SHA in the build.json
. Otherwise, the multi-arch builder uses the same base image for all arches.
Error: {'armhf': 'thomx/fr24feed-piaware:1.18.0@sha256:c21ad18c64a9d6d4f96706fe7504e0b762ecff01f5c71b00bff0a191c0857e14', 'armv7': 'thomx/fr24feed-piaware:1.18.0@sha256:f20d215e40f19dfad24d0f70c070fd89617f38335e82cd713b40c215e7ea2fac', 'aarch64': 'thomx/fr24feed-piaware:1.18.0@sha256:0bf6fb89e0fa983270c36fa8d953ea49b4c3d99a43ec5cc0b178bce7cd2712bc', 'amd64': 'thomx/fr24feed-piaware:1.18.0@sha256:44e5331926921285d6e33ad0bf5a51eea1fb63f2b5b52668591cece6f79bb9c4'} is not valid under any of the given schemas
Besides the ugliness of my addon, shouldn't the regex allow using images by its SHA?
Comparing the following two code passages, it seems action-addon-linter is incorrectly displaying an error in case an addon is specifying IPC_LOCK
in the privileged
section of its config.json
:
action-addon-linter/src/config.schema.json
Lines 182 to 190 in 7f0ae23
https://github.com/home-assistant/supervisor/blob/main/supervisor/docker/const.py#L8-L17
Or do I miss something regarding IPC_LOCK
here?
I also have some json schema files for my pet project I publish them to github pages (with custom domain but that doesn't matter).
So my schema file is available from the internet and that means they automatically work in VSCode.
If you would clone sonos-api-docs and edit this file it does the json checking right in the editor. Because I've set the $schema
in the json.
You can still use your action, which is great for checking, but this small step would allow all addon developers to use the schema files and have much less faults in their addon configuration.
Hey @frenck,
i just started to use your linter and got the following error. I don't know how to get rid of it:
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "diyhue/config.json", line 2, column 1
I tested it on this file:
https://github.com/MaxBec/hassio-diyHue/blob/master/diyhue/config.json
Here is the produced error output:
https://github.com/MaxBec/hassio-diyHue/runs/2225768951?check_suite_focus=true
Kind Regards,
Max
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
src/Dockerfile
python 3.12-alpine
.github/workflows/additional-tags.yaml
actions/checkout v4.1.4
vweevers/additional-tags-action v2.0.0
.github/workflows/labels.yaml
actions/checkout v4.1.4
micnncim/action-label-syncer v1.3.0
.github/workflows/lint.yaml
actions/checkout v4.1.4
frenck/action-yamllint v1.5
actions/checkout v4.1.4
actions/checkout v4.1.4
creyD/prettier_action v4.3
.github/workflows/lock.yaml
dessant/lock-threads v5.0.1
.github/workflows/release-drafter.yaml
release-drafter/release-drafter v6.0.0
.github/workflows/stale.yaml
actions/stale v9.0.0
src/requirements.txt
jsonschema ==4.22.0
pyyaml ==6.0.1
In the upcoming Supervisor update, it will be possible to store add-on and repository configurations in a YAML format (besides the current JSON format).
The linter needs to be adjusted to deal with that.
While developing an addon, I noticed that a slug with a hyphen seemed to break bashio, and reading the addon docs more carefully, an underscore needs to be converted to hyphen for intra-addon comms (as DNS). If these both are true, perhaps this linter should fail either character (or better regex the slug as all lowercase ascii or something?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.