What is a linter?

In computer programming, a linter is a program that scans source code and flags any constructs that are likely to be bugs. The term comes from the Linux program, lint, which is used for this purpose with the C programming language.

Wikipedia says the following:

In computer programming, lint is a Unix utility that flags some suspicious and non-portable constructs (likely to be bugs) in C languagesource code; generically, lint or a linter is any tool that flags suspicious usage in software written in any computer language. The term lint-like behavior is sometimes applied to the process of flagging suspicious language usage. Lint-like tools generally perform static analysis of source code.

Lint as a term can also refer more broadly to syntactic discrepancies in general, especially in interpreted languages like JavaScript and Python. For example, modern lint checkers are often used to find code that doesn’t correspond to certain style guidelines. They can also be used as simple debuggers for common errors, or hard to find errors such as heisenbugs.

The package linter-javac for the Atom editor lints on save any open java source files using the javac linter (presumably using the javac -Xlint options and parsing the warnings returned).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s