rhysd / actionlint

:octocat: Static checker for GitHub Actions workflow files
https://rhysd.github.io/actionlint/
MIT License
2.8k stars 155 forks source link

support ignore list in actionlint.yaml #217

Closed zvif-orca closed 1 week ago

zvif-orca commented 2 years ago

Required Functionality actionlint may require some customization when deployed into existing project Adding the ignore errors manually to a long command is not user friendly

Proposed Solution Add support for ignore list in actionlint.yaml to keep things neat

rhysd commented 2 years ago

Question: Why -ignore is not sufficient for your use case?

zvif-orca commented 2 years ago

If you mean to the cli argument - it is sufficient for my case It is just that I prefer to maintain the ignore list of in actionlint.yaml instead of maintaining a long command I followed the docs and from what I understand it is currently not supported, if this is the case - it would be nice to have

rhysd commented 2 years ago

I'm trying to keep config file as small as possible so let me consider whether it should be configured in the file.

ryanking commented 2 years ago

I would love to vote for stuff like this in the config file, as well. The reason is that I would like to run the tool in at least 3 different contexts - in my editor, at the command line and in CI. Having a single source of truth for the configuration options across those runs will make keeping them in sync much easier.

u-yas commented 1 year ago

As a current workaround, it's convenient to run it via a wrapper bash script.

#!/bin/bash
# ./scripts/actionlint

#  https://www.gnu.org/software/bash/manual/bash.html#index-_0040
actionlint -ignore 'some 1' -ignore 'some 2' "$@" 
chmod +x scripts/actionlint
./scripts/actionlint -no-color
rubarcelk commented 4 months ago

I have similiar requirement. Instead of maintaining separate Bash scripts to bypass these linting errors, I would prefer to configure my actionlint.yml file to explicitly ignore these specific errors. This approach will streamline my workflow by reducing the need for additional scripting and focusing on the essential aspects of my GitHub Actions.

pgreze commented 1 month ago

+1 on this feature request. By having all parameters (but especially ignore in this case) in the actionlint.yml, this would allow to run the CLI locally and on CI with the same configuration without having to create a wrapper bash script as advised in a previous comment.