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!
-
Thanks to those who answered. Didn’t expect a mere flag to represent Lint.– Sujith SurendranathanCommented Jan 27, 2014 at 20:53
4 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.
-
You and Jorge posted at around the same time. Thanks for the detailed explanation. I am accepting Jorge’s answer, but want to let you know that what you posted was very helpful! Commented Jan 27, 2014 at 21:01
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
-
I will always remember my C compiler in university days which warned me about a 'suspicious' cast I had made... and it was indeed suspicious!! :D– Jorge_BCommented Jan 27, 2014 at 20:44
"Lint" refers to the process of analyzing source code to locate common programming mistakes, unsafe coding practices, or the like. Options that begin with -Xlint
change the way javac
lints.