LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lint

classic static analysis tool for C programs

TLDR

Check C program
$ lint [program.c]
copy
Check with library
$ lint -l[library] [program.c]
copy
Suppress specific warnings
$ lint -e[code] [program.c]
copy
Portable mode
$ lint -p [program.c]
copy

SYNOPSIS

lint [options] files...

DESCRIPTION

lint is a classic static analysis tool for C programs. It checks source code for potential bugs, stylistic errors, and suspicious constructs that are syntactically valid but likely incorrect.lint performs deeper analysis than the compiler, catching type mismatches, unused variables, and problematic patterns.

PARAMETERS

-a

Report assignments in conditionals.
-b
Report break statements.
-c
Produce .ln files.
-e code
Suppress error code.
-l lib
Include lint library.
-p
Portable C checking.
-v
Verbose output.

COMMON CHECKS

$ - Type consistency
- Unused variables
- Unreachable code
- Format string issues
- Missing return values
copy

CAVEATS

Original lint largely replaced by compiler warnings and modern tools like clang-tidy, cppcheck. Traditional lint may not be available on all systems.

HISTORY

lint was written by Stephen C. Johnson at Bell Labs in 1978. The name comes from the lint (fluff) it picks from programs. It pioneered static analysis tools.

SEE ALSO

cppcheck(1), clang-tidy(1), gcc(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid