[ library(lint) | Reference Manual | Alphabetic Index ]

lint(+File, +Options)

Check the given source module file
File
Name of the source file (atom or string)
Options
A list of Option:Value structures

Description

Analyse a source file, do various heuristic checks on the code, and print warnings if appropriate.

The possible options are:

head_unify ('off' or 'on')
warn if a clause with a cut contains aliasing in the head, which may indicate non-steadfast code. Default: on.
missing_else ('off' or 'on')
warn if a conditions does not have an else case, since this will fail and is more clearly written using a simple conjunction or once/1. Default: on.
naming_conventions ('off' or 'on')
enable/disable naming conventions checks for variable names, predicate names and module names. Default: on.
singletons ('off' or 'on')
enable/disable singleton variable checks. Default: on.
These option settings can be overridden via pragmas in the analysed file. E.g. a pragma
    :- pragma(lint(head_unify:off)).
    
will disable head_unify checking for the subsequent code, or until another pragma enables it again.

See Also

lint / 1