Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC3014: Offer a quickfix, as it is trivial #2661

Open
2 of 4 tasks
stdedos opened this issue Jan 9, 2023 · 0 comments
Open
2 of 4 tasks

SC3014: Offer a quickfix, as it is trivial #2661

stdedos opened this issue Jan 9, 2023 · 0 comments

Comments

@stdedos
Copy link
Contributor

stdedos commented Jan 9, 2023

For bugs

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

bashism (TC_Binary id SingleBracket "==" _ _) =
warnMsg id 3014 "== in place of = is"

Here's what shellcheck currently says:

In input.sh line 10:
    if [ "$#" == 0 ] ; then
              ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC3014 -- In POSIX sh, == in place of = is ...

Here's what I wanted or expected to see:

... "fix" also

bashism (TC_Binary id SingleBracket "==" _ _) =
warnMsg id 3014 "== in place of = is"

 bashism (TC_Binary id SingleBracket "==" _ _) = 
         warnWithFix id 3014 "== in place of = is" (replaceToken id params "==" "=")

... or something equivalent/correct 😅 🥵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant