0

I have installed SublimeLinter-flake8. I would like to exclude the W191 warning when I am using SublimeLinter with flake8. I have checked the SublimeLinter docs and tried adding "--ignore W191" to my user settings file and reloaded plugins but I still get warned about the usage of tabs.

The following is my Packages/User/SublimeLinter.sublime-settings file.

// SublimeLinter Settings - User
{
 "linters": {
 "linter_name" : {
 "args" : "--ignore W191"
 }
 }
}

I checked this answer on StackOverflow but I would like it to be applied from the settings file.

asked Feb 20, 2021 at 3:21

1 Answer 1

0

The linter_name has to be the specific plugin you're looking to configure (in this case flake8) -- try this:

{
 "linters": {
 "flake8" : {
 "args" : "--ignore W191"
 }
 }
}

though realistically, it is probably better to configure your flake8 settings in flake8's configuration such that contributors to your project can work on your project without your specific sublimetext settings. I believe sublimetext's invocation of flake8 should be compatible with those configurations if I'm reading their code correctly


disclaimer: though I'm not sure it's super relevant here, I currently maintain flake8

answered Feb 20, 2021 at 3:58
Sign up to request clarification or add additional context in comments.

2 Comments

thank you so much, this worked, I will try to configure my settings in flake8 if its considered best practice
When using with black it's better to use --extend-ignore instead of --ignore because the latter overrides the ignore list and re-enables errors which were disabled for black: stackoverflow.com/a/68172142

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.