0

Is there a way to have my SublimeLinter flake8 linter only run on *.py files? I know there is an exclude key in the settings where I can specify files to ignore, but I'm looking for something more like an include setting so I can disable flake8 linting on all non-python files.

My linter settings:

 "linters":
 {
 "flake8": {
 "args": ["--ignore=E251,E501"],
 "disable": false,
 "disable_if_not_dependency": false,
 "env": {},
 "excludes": [],
 "executable": "~/miniconda3/bin/flake8",
 "filter_errors": [],
 "lint_mode": "background",
 "python": 3,
 "selector": "",
 "styles": [{"codes": [""]}],
 "working_dir": ""
 }
asked Apr 27, 2022 at 17:04

1 Answer 1

1

from the SublimeLinter docs:

you'd set selector. this appears to use the textmate selector syntax so you'd want to select something like:

 "selector": "source.python",

matching the textmate selector from the python grammar:

scopeName: "source.python"
answered Apr 27, 2022 at 18:30
Sign up to request clarification or add additional context in comments.

Comments

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.