Open zacwitte opened 7 years ago
You can already do that using the generic "Linter: Lint" command.
For example, adding something like this to your keymap.cson:
'atom-text-editor:not(.mini)':
'alt-cmd-l': 'linter-lint'
Thanks, I'll try that out. Is it possible to prevent just pylint from running on save?
it pegs a CPU and makes Atom generally slow
Okay, pylint is a hog. But it should not make Atom unresponsive (unless maybe if you have a zillion warnings) because it runs in a different process.
Is it possible to prevent just pylint from running on save?
Not that I know, but I believe that is more a limitation of the linter
infrastructure than something specific to linter-pylint
.
Now, you should be able to write a custom Atom command that remove linter-pylint from linter "Disabled Providers" setting, run Lint, then reset the setting. But this kind of Atom hacking is out of my league.
Here's another option: use the "toggle-package" package.
Enable pylint with [Cmd-Shift-P T L P return], then [Cmd-S] to run pylint (in addition to other enabled lint providers).
When your are done with pylint, fixes, disable pylint with [Cmd-Shift-P T L P return].
Actually, linter
has an option to disable on-change lints already that should work for this case. Note that it disables it for all providers. Linting on save will always trigger though.
@Arcanemagus the request was not about disabling pylint on-change. But disabling pylint on-save.
@Arcanemagus the request was not about disabling pylint on-change. But disabling pylint on-save.
Whoops, was going off the initial issue still apparently. If disabling running on save is something that you are looking for then file an issue on linter as this package has no control over when it is ran.
Another option is the "Linter: Toggle Active Editor" command, which temporarily disables Linter from running on that editor until you either re-enable it, or that editor window is closed.
pylint takes a long time to run and since I save often it means it pegs a CPU and makes Atom generally slow. I would really like to run pylint on demand using a hot key when I finish some work rather than every time I save.