4

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!

1
  • Thanks to those who answered. Didn’t expect a mere flag to represent Lint. Commented Jan 27, 2014 at 20:53

4 Answers 4

10

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.

1
  • 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
4

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

1
  • 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_B
    Commented Jan 27, 2014 at 20:44
3

"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.

1

Lint is the name of the command, see http://en.wikipedia.org/wiki/Lint_(software)

Not the answer you're looking for? Browse other questions tagged or ask your own question.