On this page
LIB LINT
Core command
LI LN
LILN
Checks the Scripts of the Scripts Library for consistency problems, without changing them.
Syntax
LIB LINT [<script> | ALL]
Arguments
| Argument | Required | Values | Default |
|---|---|---|---|
<script> | No | A path relative to the Scripts Library root; only its findings are reported | Every Script |
ALL | No | Every Script | Every Script |
Examples
LIB LINT;
LIB LINT maintenance/cleanup.bsql;
Example session
LIB LINT;
LIB LINT found 2 issue(s):
- admin/cleanup.bsql: declared @access read, statement 1 is a DELETE
- same SQL apart from layout, comments and letter case: countries/copy-of-largest.sql, countries/largest.sql (their @access declarations differ)
Details
LIB LINT reports problems; it never changes a Script. Without a name, or with ALL, it checks every Script; with a name, it reports only the findings about that Script.
Checks
- an
@instanceor@environmenttag that names no Database Group or Environment of the CDF; - an invalid, reserved or duplicate name in
-- @params:; - a
-- @paramline that cannot be read, a parameter declared twice, a default that is not a value of its type, or a name required by@paramsand given a default by@param: every call of such a Script is refused. As hints: a declared parameter the Script never uses, and, in a Script declaring@param, a${name}that no declaration and noLETof the Script defines; - a possible positional parameter
%1to%9, which were removed: usename=valuearguments and${name}. ALIKE '%1%'pattern is reported too: check it; - a
${name}written inside a quoted string, where it is not replaced. It is not reported forECHO, which prints variable values inside its quotes; - an
@accessvalue other thanreadorwrite, or two different values; - in a Script declaring
@access: read, a statement that changes a database (INSERT,UPDATE,CREATE...,LOAD,DUMP ... AS H2, connection management), and, as a hint, a statement BroadSQL cannot judge (a procedure call, aWITHquery holding a data change,SELECT ... INTO,SELECT ... FOR UPDATE, a call of another Script). The declaration is information only: BroadSQL does not enforce it when the Script runs, and it cannot see what a function called in a query does; - an
@dialectvalue that names no connection type of the CDF; - duplicate Scripts: identical SQL, or the same SQL apart from layout, comments and letter case. Only text is compared: two queries giving the same result in different ways are not reported. Nothing is changed: compare them with
LIB SHOW, and remove one withLIB DELif you wish (LIB UNDObrings it back).
With a name, the duplicate groups that Script belongs to are reported too.
Related
Used in these how-tos
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.