Comments (6)
It's intentional. When you have ~/.shellcheckrc
in your local, it affects actionlint
behavior in your local (and it will behave differently on CI). Such side effect should be avoided as much as possible.
What do you need to configure by .shellcheckrc
file?
from actionlint.
@rhysd I wanted to disable this one error SC2129
. As you can see on screenshot it is a style suggestion and would be nice if I could not be forced to fix this if this is not real issue. In general would be nice to be able to configure instead of only disabling whole shellcheck
. We plan to use .shellcheckrc
in project directory so no real issue there if it is in GIT.
from actionlint.
Thank you for sharing your motivation. I'll consider how to meet the requirement.
from actionlint.
@piotrekkr It seems that passing arguments via SHELLCHECK_OPTS
variable can be a solution for this.
SHELLCHECK_OPTS='-e SC2129' actionlint
(Related to #258)
from actionlint.
It's intentional. When you have
~/.shellcheckrc
in your local, it affectsactionlint
behavior in your local (and it will behave differently on CI). Such side effect should be avoided as much as possible.
This clarifies a lot for me, coming from #258. At least for me, I would like actionlint
to utilize the .shellcheckrc
configuration I have for the project I'm running it against - I agree that it's undesirable to use ~/.shellcheckrc
for the reason you point out.
While using the SHELLCHECK_OPTS
environment variable is a viable workaround, perhaps a long term solution would be for actionlint
to (perhaps optionally) use, if present, the .shellcheckrc
file in the working directory where actionlint
is invoked (or actionlint
could even accept the location of the .shellcheckrc
file as an argument). I don't think shellcheck
currently supports this use case, but there is an open issue for it: koalaman/shellcheck#1879
The primary reason I think this would be a better solution is because it can help avoid duplication of the ShellCheck configuration, what do you think @rhysd?
from actionlint.
@rhysd Yeah this could work if we did not use devops-actions/actionlint for linting.
run-actionlint:
name: Run actionlint
runs-on: ubuntu-22.04
timeout-minutes: 3
steps:
- name: Checkout app code
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Run actionlint
uses: devops-actions/[email protected]
It is wrapper around this tool. There seems to be no way to pass this env there. I'll create ticket in their repo about adding this somehow (maybe as input or to just pass env to docker). Anyway, thanks for your help. Will close this one.
from actionlint.
Related Issues (20)
- Action lint fails occasionally - fatal error: concurrent map writes HOT 6
- No labels for Larger Hosted Runners HOT 2
- Actionlint does not alert on a mis-terminated expression for `if`
- Warning if explicit shell is not set HOT 2
- Support glob/regex patterns for self hosted runner labels configuration HOT 1
- Support validation of the inputs passed in the with block
- [BUG] `timeout-minutes` should allow expressions (but it demands `floats`) HOT 3
- Feature Request: checking workflow inputs for Untrusted input HOT 1
- Support tsc to check actions/github-script steps HOT 1
- Feature request: Require job name
- feature request: detect invalid reference to a workflow file HOT 1
- support macOS-14 runs on HOT 3
- Disallow usage of `>-`, which is not supported by GitHub actions HOT 5
- Release recent changes HOT 1
- Composite actions support? HOT 4
- False Positive On fromJson in services Mapping Nodes
- Failed on "google-github-actions/get-secretmanager-secrets" HOT 7
- v1.6.27 Actionlint do not recognising outputs from google-github-actions/get-secretmanager-secrets@v2 HOT 1
- Seems like actionlint lack support to detect when we call reusable workflow in the main workflow. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actionlint.