harpoon.Main
Class Lint
java.lang.Object
harpoon.IR.Registration
harpoon.Main.Lint
public abstract class Lint
- extends Registration
Lint
is a quick Java code-checker.
Currently it checks only two things:
- Uses of
Label
.toString()
(which should
almost always be Label.name
instead), and
- Testing objects for equality using
==
(instead of
equals()
).
Invoke with:
java harpoon.Main.Lint [package1] [package2] ...
Output is a list of source files and line numbers which are being
flagged as possibly incorrect.
- Version:
- $Id: Lint.java,v 1.3 2004/02/08 01:58:13 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
Constructor Summary |
Lint()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
linker
public static final Linker linker
Lint
public Lint()
usage
public static void usage(String errmsg)
main
public static void main(String[] args)
getSLR
public static harpoon.Main.Lint.SourceLineReader getSLR(HClass cls,
String sourcefile)
- method for caching sourcelinereaders
printError
public static void printError(String msg,
HMethod hm,
HCodeElement hce)
- print out a standardized error message