You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is with v0.10.0. It also happens with v0.8.0 so it doesn't seem specific to the latest version.
While creating an install script for shellcheck which curls down the latest shellcheck release I had this code:
# shellcheck uses a different file name than what uname -m may output.
[[ "${cpu_arch}"=~ ^arm ]] && cpu_arch="armv6hf"
I don't know if this strategy will work since I don't have a Linux arm64 device to test on but let's ignore that component for now.
This throws an error on the comment:
In install line 89:
# shellcheck uses a different file name than what uname -m will output.
^-- SC1073 (error): Couldn't parse this shellcheck directive. Fix to allow more checks. ^-- SC1072 (error): Expected '=' after directive key. Fix any mentioned problems and try again.
It took me a second to realize this is a problem because shellcheck uses comments to figure out if it should ignore something, but I wonder if something can be adjusted to try and determine if the comment line is related to setting a disable= and if not maybe it can be ignored?
The workaround is to reword the comment to start with ShellCheck which funny enough is a better choice anyways since it's referencing the name of the tool itself, not a directive but this feels like a "it's a feature not a bug but maybe it's actually a bug" type of thing?
What do you think?
Great tool btw, I've been using it for like 6 years and this is the first time it has surprised me.
The text was updated successfully, but these errors were encountered:
brother
changed the title
Comments starting with shellcheck throw SC0172 and SC0173 when they are not related to disabling rules
Comments starting with shellcheck throw SC1072 and SC1073 when they are not related to disabling rules
Mar 19, 2025
This is with v0.10.0. It also happens with v0.8.0 so it doesn't seem specific to the latest version.
While creating an install script for shellcheck which curls down the latest shellcheck release I had this code:
I don't know if this strategy will work since I don't have a Linux arm64 device to test on but let's ignore that component for now.
This throws an error on the comment:
It took me a second to realize this is a problem because shellcheck uses comments to figure out if it should ignore something, but I wonder if something can be adjusted to try and determine if the comment line is related to setting a
disable=
and if not maybe it can be ignored?The workaround is to reword the comment to start with ShellCheck which funny enough is a better choice anyways since it's referencing the name of the tool itself, not a directive but this feels like a "it's a feature not a bug but maybe it's actually a bug" type of thing?
What do you think?
Great tool btw, I've been using it for like 6 years and this is the first time it has surprised me.
The text was updated successfully, but these errors were encountered: