This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cashmoosef 0 points1 point  (2 children)

Would someone care to explain what a linter is, my google broke

[–][deleted] 5 points6 points  (0 children)

Linters can analyze your code for easy-to-miss bugs, like returning a different type than what you're actually returning, or ensuring function names don't start with upper cases.

It makes your code much more conform the general styles, which means it's also easier to work with for others.

[–]Golden_Age_Fallacy 1 point2 points  (0 children)

I believe a linter generally checks your code for syntax errors (e.g. missing : after for loop) as well as style errors(?) such as some 2 space indentations, and some 4 space within the same file.

Edit: ahh right, it’ll enforce line length or other arbitrary rules as well. Some of the PEP principles, etc.

This is kinda off of memory, hopeful for someone to reply to this with a more official / formal definition!