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

SC1071 can't be disabled via RC file #2534

Closed
matatk opened this issue Jul 16, 2022 · 3 comments
Closed

SC1071 can't be disabled via RC file #2534

matatk opened this issue Jul 16, 2022 · 3 comments

Comments

@matatk
Copy link

matatk commented Jul 16, 2022

If I have

disable=SC1071

as the contents of my .shellcheckrc file, I still get errors if I try to check a zsh script, for example.

However, if I use shellcheck --exclude 1071 the error is ignored.

This sounds like it might be related to #1931 (comment)

Thanks for this tool; it's great!

Update: Forgot to say, I'm using 0.8.0; oops!

@koalaman
Copy link
Owner

It was a similar issue in which directives were not applied until the body of the script. This is now fixed. Thanks!

@luckman212
Copy link

Leaving this here in case it helps someone else...

I was getting annoyed with the nagging from Sublime too. I didn't realize this bug existed, and was wondering why my ~/.shellcheckrc file wasn't having any effect on SublimeLinter.

To "fix" this, go to Preferences → Package Settings → SublimeLinter → Settings and then paste the stanza below into your User Settings.

{
  "linters": {
    "shellcheck": {
      "args": [ "--exclude=1071" ]
    }
  }
}

@matatk
Copy link
Author

matatk commented Sep 3, 2022

Thanks for fixing this @koalaman; I built it locally and it's working fine. If/when possible, it'd be great if you could make a new release with this fix included.

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

3 participants