Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of "lint" in the command -Xlint=unchecked?

Tags:

java

javac

What does "lint" in the flag -Xlint=unchecked for javac stand for? Since it deals with generic types, one would expect something like -Xgenerics=unchecked or so!

like image 287
crnlx Avatar asked Dec 01 '22 17:12

crnlx


2 Answers

It's a tip-o-the-hat to the programming history:

In computer programming, lint was the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely to be bugs) in C language source code. The term is now applied generically to tools that flag suspicious usage in software written in any computer language.

Lint first appeared (outside of Bell Labs) in the seventh version (V7) of the Unix operating system in 1979.

like image 192
Marko Topolnik Avatar answered Dec 19 '22 06:12

Marko Topolnik


It derives from a C language optional compiling tool with the purpose of detecting 'suspicious' behaviors in your code. It has become a standard way to refer to this kind of static code analysis

like image 21
Jorge_B Avatar answered Dec 19 '22 07:12

Jorge_B