Everipedia Logo
Everipedia is now IQ.wiki - Join the IQ Brainlist and our Discord for early access to editing on the new platform and to participate in the beta testing.
lint (software)

lint (software)

lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.[1] The term originates from a Unix utility that examined C language source code.[2]

lint
Original author(s)Stephen C. Johnson
Developer(s)AT&T Bell Laboratories
Initial release1978 (1978)
Written inC
Operating systemCross-platform
Available inEnglish
TypeStatic program analysis tools

History

Stephen C. Johnson, a computer scientist at Bell Labs, came up with lint in 1978 while debugging the yacc grammar he was writing for C and dealing with portability issues stemming from porting Unix to a 32-bit machine.[3][2] The term "lint" was derived from the name of the undesirable bits of fiber and fluff found in sheep's wool. In 1979, lint was used outside of Bell Labs for the first time in the seventh version (V7) of the Unix operating system.

Over the years, different versions of lint were developed for many C and C++ compilers and while modern-day compilers have lint-like functions, lint-like tools have also advanced their capabilities. For example, Gimpel's PC-Lint, used to analyze C++ source code, is still being sold even though it was introduced in 1985.[3]

Overview

The analysis performed by lint-like tools can also be performed by an optimizing compiler, which aims to generate faster code. In his original 1978 paper, Johnson addressed this issue, concluding that "the general notion of having two programs is a good one" because they concentrated on different things, thereby allowing the programmer to "concentrate at one stage of the programming process solely on the algorithms, data structures, and correctness of the program, and then later retrofit, with the aid of lint, the desirable properties of universality and portability".[2]

Even though modern compilers have evolved to include many of lint's historical functions, lint-like tools have also evolved to detect an even wider variety of suspicious constructs. These include "warnings about syntax errors, uses of undeclared variables, calls to deprecated functions, spacing and formatting conventions, misuse of scope, implicit fallthrough in switch statements, missing license headers, [and]...dangerous language features".[4]

Lint-like tools are especially useful for interpreted languages like JavaScript and Python. Because such languages lack a compiling phase that displays a list of errors prior to execution, the tools can also be used as simple debuggers for common errors (e.g. syntactic discrepancies) as well as hard-to-find errors such as heisenbugs (drawing attention to suspicious code as "possible errors").[5] Lint-like tools generally perform static analysis of source code.[6]

See also

  • List of tools for static code analysis

References

[1]
Citation Linkwww.sublimelinter.com"About SublimeLinter — SublimeLinter 3.4.24 documentation". www.sublimelinter.com.
Sep 28, 2019, 8:05 PM
[2]
Citation Linkciteseerx.ist.psu.eduJohnson, Stephen C. (25 October 1978). "Lint, a C Program Checker". pp. 78–1273 – via CiteSeer.
Sep 28, 2019, 8:05 PM
[3]
Citation Linkwww.red-gate.comMorris, Richard (1 October 2009). "Stephen Curtis Johnson: Geek of the Week". Red Gate Software. Retrieved 19 January 2018.
Sep 28, 2019, 8:05 PM
[4]
Citation Linksecure.phabricator.com"Arcanist User Guide: Lint". Phabricator. Retrieved 19 January 2018.
Sep 28, 2019, 8:05 PM
[5]
Citation Linkwww.thecodecampus.de"ESLint - Customizable JavaScript linting tool (1)". theCodeCampus. 2015-06-09. Retrieved 2019-04-21.
Sep 28, 2019, 8:05 PM
[6]
Citation Linkbarrgroup.comJones, Nigel (1 May 2002). "How to Use Lint for Static Code Analysis". Barr Group.
Sep 28, 2019, 8:05 PM
[7]
Citation Linkbooks.google.comChecking C Programs with Lint: C Programming Utility
Sep 28, 2019, 8:05 PM
[8]
Citation Linkwww.freebsd.org"LINT(1)"
Sep 28, 2019, 8:05 PM
[9]
Citation Linkwww.sublimelinter.com"About SublimeLinter — SublimeLinter 3.4.24 documentation"
Sep 28, 2019, 8:05 PM
[10]
Citation Linkciteseerx.ist.psu.edu"Lint, a C Program Checker"
Sep 28, 2019, 8:05 PM
[11]
Citation Linkwww.red-gate.com"Stephen Curtis Johnson: Geek of the Week"
Sep 28, 2019, 8:05 PM
[12]
Citation Linksecure.phabricator.com"Arcanist User Guide: Lint"
Sep 28, 2019, 8:05 PM
[13]
Citation Linkwww.thecodecampus.de"ESLint - Customizable JavaScript linting tool (1)"
Sep 28, 2019, 8:05 PM
[14]
Citation Linkbarrgroup.com"How to Use Lint for Static Code Analysis"
Sep 28, 2019, 8:05 PM
[15]
Citation Linkbooks.google.comChecking C Programs with Lint: C Programming Utility
Sep 28, 2019, 8:05 PM
[16]
Citation Linkwww.freebsd.org"LINT(1)"
Sep 28, 2019, 8:05 PM
[17]
Citation Linken.wikipedia.orgThe original version of this page is from Wikipedia, you can edit the page right here on Everipedia.Text is available under the Creative Commons Attribution-ShareAlike License.Additional terms may apply.See everipedia.org/everipedia-termsfor further details.Images/media credited individually (click the icon for details).
Sep 28, 2019, 8:05 PM