I took a look at “Top Python Libraries of 2022” and it started with the question:
Was there anyone who did not use a linter in 2022?
Uh… What’s a linter? I guess I’ve been remiss in my work flow.
I took a look at “Top Python Libraries of 2022” and it started with the question:
Was there anyone who did not use a linter in 2022?
Uh… What’s a linter? I guess I’ve been remiss in my work flow.
A “linter” is a syntax and (sometimes) style checker that “proofreads” your code and checks for silly errors. Earlier linters only checked syntax whereas more modern linters can enforce a standard style template - which is useful in dev shops so that all the code is uniformly formatted.
Lint was originally written for C, because there was no pre-compile checking, and compilation was relatively expensive time-wise, (as in hours and hours and hours before completion). The linter caught all (most) of the B.S. errors before running the compiler. Not to mention that it was much faster than the compiler.
Depending on the size of the code (like compiling a custom kernel from scratch), it could take over a day to complete (depending on the system), and waiting a day to find out that the compiler puked was a bit annoying. So they came up with a “quick sanity test” to eliminate the lion’s share of the fussy errors.
VS Code has add-ons for linting/style checking various languages like Python, JavaScript, C, C++, C#, and so on.
Very possibly not, depending on the dev environment you’re using.
Many modern dev tools/IDEs do a lot of (for want of a better term), “self linting” or syntax checking while you’re writing the code.
VS Code, for example, does a lot of checking for coding errors, missing dependencies, and such like.
I believe that both Geany and Thonny do something similar.
It’s not uncommon to find things like this in modern development tools.
I use VS Code- for python it has Pylance. From the product description:
Fast, feature-rich language support for Python
Pylance is an extension that works alongside Python in Visual Studio Code to provide performant language support. Under the hood, Pylance is powered by Pyright, Microsoft’s static type checking tool. Using Pyright, Pylance has the ability to supercharge your Python IntelliSense experience with rich type information, helping you write better code faster.
Pylance is the default language support for Python in Visual Studio Code and is shipped as part of that extension as an optional dependency.
The Pylance name is a small ode to Monty Python’s Lancelot who was the first knight to answer the bridgekeeper’s questions in the Holy Grail.
It’s really pretty seamless within VS Code
/K
Guess I’m the only one using a 1970’s editor.
Emacs if I recall? Certainly there seems to be a strong fan base for that still (and for Vim - I’ll stay out of those flame wars). I know there are a bunch of things integrated into Emacs. But VS Code has so many useful add-ons it makes things really handy. It plays nice with git and GitHub. And it’s open source. Never too late to join the dark side
/K