Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Implement yamllint rules #240

Open
roaldnefs opened this issue Jan 29, 2021 · 5 comments
Open

Feature Request: Implement yamllint rules #240

roaldnefs opened this issue Jan 29, 2021 · 5 comments
Labels

Comments

@roaldnefs
Copy link
Member

Is your feature request related to a problem? Please describe.
Allow running the same rules as yamllint on SLS files to check for issues such as indentation, etc.

Describe the solution you'd like
Add rule to run yamllint on SLS files after stripping all Jinja expressions, statements and comments. See the YamlLintRule in ansible-lint as an example.

Describe alternatives you've considered
Re-implementing all the yamllint rules separately.

Additional context
This feature request duplicates #106, #105, #92.

@colttt
Copy link

colttt commented Aug 16, 2021

any news on that?
maybe you can add this to you salt-lint docker file to install?!

@jbouter
Copy link
Member

jbouter commented Aug 16, 2021

Hi @colttt !

It's not as easy as simply adding yamllint. But for now we don't have a status update sadly.

Feel free to use our container image for salt-lint and add yamllint yourself though. Or implement a new step in your CI where you run yamllint on all sls files. Though be prepared for a whole lot of false positives.

@colttt
Copy link

colttt commented Aug 16, 2021

Feel free to use our container image for salt-lint and add yamllint yourself though.
I try that, but I can't install it, permission denied with the following config (as you remember, its my first time ;) )

default:
 before_script:
    - apk add yamllint

I got:

$ apk add yamllint
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied

@jbouter
Copy link
Member

jbouter commented Aug 16, 2021

It's a hardened image. You can't just add stuff to the container itself.

Fork the Dockerfile and build it yourself.

@roaldnefs roaldnefs removed their assignment Nov 6, 2021
@roaldnefs
Copy link
Member Author

Opened #297 to further discuss to possible solutions.

This issues related to #246 and #258.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants