Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Overview  





3 Successor linters  





4 See also  





5 References  





6 Further reading  














Lint (software)






العربية
Čeština
Deutsch
Español
Esperanto
Français

Interlingua
Italiano
עברית

Polski
Русский
Українська
Tiếng Vit

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Lint is the computer science term for a static code analysis tool used 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] A program which performs this function is also known as a "linter".

History

[edit]
Lint
Original author(s)Stephen C. Johnson
Developer(s)AT&T Bell Laboratories
Initial releaseJuly 26, 1978; 45 years ago (1978-07-26)[2]
Written inC
Operating systemCross-platform
Available inEnglish
TypeStatic program analysis tools
LicenseOriginally proprietary commercial software, now free software under a BSD-like license[3][4]

Stephen C. Johnson, a computer scientist at Bell Labs, came up with the term "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.[5][2] The term was borrowed from the word lint, the tiny bits of fiber and fluff shed by clothing, as the command he wrote would act like a lint trap in a clothes dryer, capturing waste fibers while leaving whole fabrics intact. In 1979, lint programming was used outside of Bell Labs for the first time, in the seventh version (V7) of Unix.

Over the years, different versions of lint have been 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, introduced in 1985 and used to analyze C++ source code, is still for sale.[5]

Overview

[edit]

In his original 1978 paper Johnson stated his reasoning in creating a separate program to detect errors, distinct from that which it analyzed: "...the general notion of having two programs is a good one" [because they concentrate 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]

Successor linters

[edit]

The analysis performed by lint-like tools can also be performed by an optimizing compiler, which aims to generate faster code. 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".[6]

Lint-like tools are especially useful for dynamically typed languages like JavaScript and Python. Because the interpreters of such languages typically do not enforce as many and as strict rules during execution, linter tools can also be used as simple debuggers for finding common errors (e.g. syntactic discrepancies) as well as hard-to-find errors such as heisenbugs (drawing attention to suspicious code as "possible errors").[7] Lint-like tools generally perform static analysis of source code.[8]

Lint-like tools have also been developed for other aspects of software development: enforcing grammar and style guides for given language source code.[citation needed] Some tools (such as ESLint) also allow rules to be auto-fixable: a rule definition can also come with the definition of a transform that makes the rule no longer not triggered. Rules about style are especially likely to come with an auto-fix. If the linter is run in "fix all" mode on a file that triggers only rules about formatting, the linter will act just like a formatter.

See also

[edit]

References

[edit]
  1. ^ "About SublimeLinter". The SublimeLinter Community, revision 1cecc79c. Retrieved 2020-03-29.
  • ^ a b c d Johnson, Stephen C. (25 October 1978). "Lint, a C Program Checker". Comp. Sci. Tech. Rep. Bell Labs: 78–1273. CiteSeerX 10.1.1.56.1841. Archived from the original on 2022-01-23.
  • ^ "UNIX is free!". lemis.com. 2002-01-24.
  • ^ Broderick, Bill (January 23, 2002). "Dear Unix enthusiasts" (PDF). Caldera International. Archived from the original (PDF) on February 19, 2009.
  • ^ a b Morris, Richard (1 October 2009). "Stephen Curtis Johnson: Geek of the Week". Red Gate Software. Retrieved 19 January 2018.
  • ^ "Arcanist User Guide: Lint". Phabricator. Retrieved 19 January 2018.
  • ^ "ESLint - Customizable JavaScript linting tool (1)". theCodeCampus. 2015-06-09. Retrieved 2019-04-21.
  • ^ Jones, Nigel (1 May 2002). "How to Use Lint for Static Code Analysis". Barr Group.
  • Further reading

    [edit]
    Retrieved from "https://en.wikipedia.org/w/index.php?title=Lint_(software)&oldid=1233458138"

    Categories: 
    Static program analysis tools
    Unix software
    Formerly proprietary software
    Software using the BSD license
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    All articles with unsourced statements
    Articles with unsourced statements from July 2020
     



    This page was last edited on 9 July 2024, at 05:15 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki