Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Use this tag for all questions about using unix-lint like tools (linters) in the educational process. Both static tools (lint itself) and dynamic tools (syntax error highlighters...) are covered by this idea.

Lint is a Unix tool that finds and reports potential errors in C programs by examining the program text statically. Originally it was designed to make compilers easier to write, offloading error reporting to another tool. In the modern world, such tools are still used, but have been updated as subsystems in sophisticated development environments that employ some form of incremental compilation. This enables the environment to highlight, in near real-time, many errors in the program, especially type errors.

In general, a linter is a diagnostic tool for finding errors in a static way, examining the program text, as opposed to a dynamic debugger that operates at run-time.

Historical Note. The word "bug" is often used to absolve programmers from their mistakes: "A bug just flew into my program." There is a story about Grace Murray Hopper finding an actual bug (moth) caught in a relay of an early electro mechanical computer.

Likewise lint is those little bits of garbage that wind up "somehow" in your programs like they do on your formal clothing. It just "happens", not my fault. Lint-like tools help you remove the lint.