shellcheck icon indicating copy to clipboard operation
shellcheck copied to clipboard

Github actions not finding .shellcheckrc

Open reggi opened this issue 5 years ago • 2 comments

I have a .shellcheckrc with the following in the root dir of my repo.

disable=SC2034

This is suppressing error SC2034 locally on my machine, however in Github actions it doesn't seem to pick up the ignore file, and the errors are coming through.

I was hoping the command would have a --rc=./.shellcheckrc flag to force config discovery, but I didn't see this.

The actions are running ubuntu.

reggi avatar Jul 03 '20 17:07 reggi

I'm having the same problem! .shellcheckrc is laying the the same folder from where shellcheck is going to be executed (i.e. repo root). Adding the --rc option would be great!

Latest docker image does not seem to work, 0.7.1 does:

image

milkpirate avatar Sep 11 '20 10:09 milkpirate

I don't have the issue of shellcheck not finding a local .shellcheckrc, but it would still be very helpful to me to have the --rc option mentioned here. I want to be able to apply a specific set of checks to arbitrary files on demand, regardless of where the files are.

I think the best workaround currently is to have a wrapper script that passes a bunch of command-line flags (or sets SHELLCHECK_OPTS), but these are in a different format than .shellcheckrc, so it's a bit awkward.

sellout avatar Nov 16 '23 00:11 sellout