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": ""
}
1 Answer 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
anthony sottile
72.1k20 gold badges199 silver badges248 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-py