Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Introduction</strong></p> <p>The first version of Lint was developed by Stephen C. Johnson while at Bell Laboratories in an effort to detect bugs that may have otherwise gone unnoticed in C programs. The following is from the abstract for "Lint, a C Program Checker" written by Johnson in 1978.</p> <blockquote> <blockquote> <p><em>Lint</em> is a command which examines C source programs, detecting a number of bugs and obscurities. It enforces the type rules of C more strictly than the C compilers. It may also be used to enforce a number of portability restrictions involved in moving programs between different machines and/or operating systems. Another option detects a number of wasteful, or error prone, constructions which nevertheless are, strictly speaking, legal.</p> </blockquote> </blockquote> <p>Johnson's Lint command first appeared (outside of Bell Laboratories) in 1979 as part of the Unix 7 distribution kit. A version of the command still exists today and a description of the utility can be found in the FreeBSD man pages:</p> <blockquote> <blockquote> <p>The lint utility attempts to detect features of the named C program files that are likely to be bugs, to be non-portable, or to be wasteful. It also performs stricter type checking than does the C compiler.</p> <p>Among the possible problems that are currently noted are unreachable statements, loops not entered at the top, variables declared and not used, and logical expressions with constant values. Function calls are checked for inconsistencies, such as calls to functions that return values in some places and not in others, functions called with varying numbers of arguments, function calls that pass arguments of a type other than the type the function expects to receive, functions whose values are not used, and calls to functions not returning values that use the non-existent return value of the function.</p> </blockquote> </blockquote> <p>Due primarily to the popularity of the original Lint command, the term 'lint' has come to signify static analysis tools in general. A myriad of tools exist today, some of which include:</p> <p>Open source:</p> <ul> <li><a href="http://www.splint.org/" rel="nofollow noreferrer">Splint</a></li> </ul> <p>Commercial:</p> <ul> <li><a href="http://www.gimpel.com/" rel="nofollow noreferrer">PC-lint/Flexelint</a></li> <li><a href="http://www.klocwork.com/" rel="nofollow noreferrer">Klocwork</a></li> <li><a href="http://www.coverity.com/" rel="nofollow noreferrer">Coverity</a></li> <li><a href="http://www-01.ibm.com/software/awdtools/purify/" rel="nofollow noreferrer">Purify</a></li> </ul> <p><strong>Usage of the Stack Overflow "lint" tag</strong></p> <p>Only use this tag for questions involving the various Lint tools from <a href="http://www.gimpel.com/html/index.htm" rel="nofollow noreferrer">Gimpel Software</a>.</p> <p>Please refrain from using this tag regarding general questions about static analysis. Questions in regard to the static analysis of code and the use of static analysis tools should use <a href="/questions/tagged/static-analysis" class="post-tag" title="show questions tagged &#39;static-analysis&#39;" rel="tag">static-analysis</a>.</p> <p><strong>References</strong></p> <p>Karpov, Andrey, <em>Parallel Lint: Verifying parallel programs</em>, <a href="http://www.drdobbs.com/parallel-lint/218000153" rel="nofollow noreferrer">Dr. Dobb's The World of Software Development</a>, 2009.</p> <p>Johnson, S.C., <em>Lint, a C Program Verifier</em>, Bell Laboratories, Murray Hill, New Jersey, 1978.</p> <p>The Unix and Linux Forums, <em>BSD General Commands Manual</em>, <a href="http://www.unix.com/man-page/FreeBSD/1/lint" rel="nofollow noreferrer">lint - a C program verifier</a>, 2001.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload