Lint is a command, first documented by Stephen C. Johnson of Bell Laboratories in a technical report dated July 26, 1978, that “examines C source programs, detecting a number of bugs and obscurities.” Where the C compilers of the day were tuned to turn source into executables quickly, lint was free to take “a more global, leisurely view of the program,” looking far more carefully at consistency between separately compiled files than the compiler ever did. It is the direct ancestor of the entire family of tools now called linters.
Johnson’s report lays out three jobs for the tool. First, it “enforces the type rules of C more strictly than the C compilers,” catching mismatches the compiler would silently accept. Second, it can “enforce a number of portability restrictions involved in moving programs between different machines and/or operating systems,” which mattered enormously as Unix was being ported off the PDP machines to other hardware. Third, it “detects a number of wasteful, or error prone, constructions which nevertheless are, strictly speaking, legal” C, such as variables that are set but never used or functions whose return values are inconsistently used.
The report is explicit about why this work was deliberately separated from the compiler. The compilers “do not do sophisticated type checking, especially between separately compiled programs,” precisely so they can stay fast and efficient. Lint takes on the slower, more thorough analysis instead. That division of labor, a fast compiler plus a separate, stricter static checker, is the design pattern that every modern linter inherits.
The name itself comes from the lint trap of a clothes dryer, the screen that catches the bits of fluff and fiber shed by fabric. Lint the program plays the same role for source code, trapping the small, fuzzy problems that accumulate in a program while letting the real work pass through. Johnson reportedly coined the term while wrestling with portability problems exposed by moving Unix to a 32-bit machine, around the same period he was building yacc.
Lint shipped with Seventh Edition Unix and spread with it. For decades C and C++ programmers ran lint (and commercial successors such as PC-lint and Gimpel’s products) as a routine step before or alongside compilation. The idea generalized far beyond C: tools like Pylint, ESLint, clang-tidy, and golangci-lint all descend conceptually from Johnson’s report, applying the same principle of static checks for correctness, portability, and style that go beyond what a compiler is willing to enforce.