Lint: Command Not Found

Does Ubuntu have a lint utility? How is it installed?

In computer programming, lint is a Unix utility..

thufir@mordor:~$ 
thufir@mordor:~$ gcc program.c -o prog
program.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^
thufir@mordor:~$ 
thufir@mordor:~$ ./prog

Hello World

thufir@mordor:~$ 
thufir@mordor:~$ lint program.c
No command 'lint' found, did you mean:
 Command 'line' from package 'util-linux' (main)
 Command 'jlint' from package 'jlint' (universe)
 Command 'link' from package 'coreutils' (main)
 Command 'dlint' from package 'dlint' (universe)
 Command 'lift' from package 'lift' (universe)
 Command 'tint' from package 'tint' (universe)
 Command 'hlint' from package 'hlint' (universe)
lint: command not found
thufir@mordor:~$ 

I'm trying to use lint as so:

lint program.c | tee program.lint

This displays the standard output of the command lint program.c at the computer, and at the same time saves a copy of it in the file program.lint. If a file named program.lint already exists, it is deleted and replaced.

The manpage which wikipedia references is for BSD, I can't find a manpage for the Linux variant. Do I need to install it, perhaps?

1

2 Answers

See splint - a GPL rewrite of lint.

However, splint does not fully support C99.

It is recommended to use cppcheck.

From apt-cache search lint

splint - tool for statically checking C programs for bugs.
splint-data - tool for statically checking C programs for bugs - data files
splint-doc-html - tool for statically checking C programs for bugs - HTML documentation

Installation

sudo apt-get install splint

Documentation

For documentation, examples and the downloads, check their website at .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest