question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement linting on change

See original GitHub issue

As per this comment in #28, a new feature request:

Actually implement python.linting.lintOnTextChange, to apply linting to the unsaved buffer.

This is a desirable, if nontrivial, function.

See also #313 - if this is implemented, that should be reversed.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:284
  • Comments:38 (12 by maintainers)

github_iconTop GitHub Comments

38reactions
malmaudcommented, Dec 15, 2017

I’ll just point out that PyCharm, atom, and sublime already have this. Most language packages for VSCode also have it. So this is really an outlier in terms of missing functionality. Thanks!

20reactions
xgusecommented, Dec 18, 2017

PS: since I cant comment on #313

It advises:

"python.linting.lintOnSave": true,
"files.autoSave": true

As far as I can tell "files.autoSave": true is not actually an expected state for this option. I may be wrong but when I look at this, the options provide are:

 // Controls auto save of dirty files. Accepted values: 
'off', 
'afterDelay', 
'onFocusChange' (editor loses focus), 
'onWindowChange' (window loses focus). If set to 'afterDelay', you can configure the delay in 'files.autoSaveDelay'.

This is kind of crazy to me. I have to have my file write to disk every second in order to get linting while I write?

I will echo @malmaud on pointing out that this doesn’t seem to be a “luxury” setting for most other languages/editors. It was quite surprising to me when I encountered this in this extension.

However, please don’t misunderstand my tone: I am VERY thankful for your work so far and would like to point out that having python so well supported for the most part in VS Code was what allowed me to finally leave Atom. It have for the MOST part been a spectacular change.

So thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Enable Linting on Save with Visual Studio Code ...
Save the changes to your file. In your code editor, open the JavaScript file you created earlier. All the broken rules will be...
Read more >
What is linting and how can it save you time?
lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
Read more >
A Practical Guide to Introducing Linting to Your ...
At Compass, we use pre-commit hooks which run our linters on the subset of files that have actually changed. This ensures that code...
Read more >
Linting Python in Visual Studio Code
To select a different linter, use the Python: Select Linter command. You can also edit your settings manually to enable multiple linters.
Read more >
Lint Code: What Is Linting + When To Use Lint Tools
Learn how to easily use lint programming and lint tools (also known as linters) to reduce ... Make changes to the code to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found