https://bugzilla.redhat.com/show_bug.cgi?id=1507505
Bug ID: 1507505 Summary: ShelLCheck 0.4.5 does not honor file scope "shellcheck disable=SC2181" Product: Fedora Version: 26 Component: ShellCheck Assignee: dridi.boukelmoune@gmail.com Reporter: noloader@gmail.com QA Contact: extras-qa@fedoraproject.org CC: dridi.boukelmoune@gmail.com, greg.hellings@gmail.com, haskell-devel@lists.fedoraproject.org, petersen@redhat.com
I'm working on Fedora 26 x86_64 (fully patched). I have ShellCheck 0.4.5 installed from the Fedora repos.
Checking a shell script with SC2181 disabled still produces SC2181 warnings:
git clone https://github.com/weidai11/cryptopp.git shellcheck cryptest.sh | grep -i -c SC2181 68
To disable the warning, the following was added after the shebang and before any commands:
# Keep the noise down # shellcheck disable=SC2181
The same exercise on Ubuntu 17 with ShellCheck 0.4.4 does not witness the problem. Others on Stack Overflow cannot reproduce the problem either. Also see https://stackoverflow.com/q/47014776/608639 .
**********
$ yum info shellcheck Installed Packages Name : ShellCheck Version : 0.4.5 Release : 3.fc26 Arch : x86_64 Size : 6.0 M Source : ShellCheck-0.4.5-3.fc26.src.rpm Repo : @System From repo : fedora Summary : Shell script analysis tool URL : https://github.com/koalaman/shellcheck License : GPLv3+ Description : The goals of ShellCheck are: : : * To point out and clarify typical beginner's syntax issues, : that causes a shell to give cryptic error messages. : : * To point out and clarify typical intermediate level semantic : problems, that causes a shell to behave strangely and : counter-intuitively. : : * To point out subtle caveats, corner cases and pitfalls, that : may cause an advanced user's otherwise working script to fail : under future circumstances.