sklint
sklint(
[ ?file tl_inputFileName ]
[ ?context t_contextName ]
[ ?outputFile t_outputFileName ]
[ ?ignoreGroups l_ignoreGroups ]
[ ?globals l_globals ]
[ ?depends l_depends ]
[ ?rulesFile t_rulesFile ]
[ ?ignores l_ignoresMessageList ]
[ ?checkNlambda g_checkNlambda ]
[ ?noPrintLog g_noPrintLog ]
[ ?useGlobalIgnores g_useGlobalIgnores ]
[ ?useGlobalRulesFileList g_useGlobalRulesFileList ]
[ ?useDisableMessages g_useDisableMessages ]
[ ?checkCdsFuncs g_checkCdsFuncs ]
[ ?checkPvtFuncs g_checkPvtFuncs ]
[ ?checkPubFuncs g_checkPubFuncs ]
[ ?prefixes l_prefixList ]
[ ?checkCdsPrefixes g_checkCdsPrefixes ]
[ ?checkFuncPrefixes g_checkFuncPrefixes ]
[ ?tabulate g_tabulate ]
[ ?skPath t_skPath ]
[ ?codeVersion t_release ]
)
=> t / nil
Description
Checks a SKILL file or context and reports potential errors and ways to clean up your code.
Arguments
|
?file tl_fileFileName
|
|
|
The name of the file to be processed, or a list of file names. Each file is read and processed in turn.This option defaults to startup.il.
|
|
?context t_context
|
|
|
The name of the context, or an absolute-pathed context name, being processed. SKILL Lint looks under the install_dir/pvt/etc/context/t_contextName directory for all files ending with .il and .ile unless a file other than startup.il is given. If a file other than startup.il is given along with a context, that file is assumed to belong in that context and global variable package prefixes for that context are used if possible.
|
|
?outputfile t_outputFile
|
|
|
The name of the reporting log file. Defaults to contextName.log.
|
|
?ignoreGroups l_ignoreGroups
|
|
|
The list of rule groups that should not be carried out.
|
|
?globals l_globals
|
|
|
The list of allowed globals not covered by the standard global list and the prefix list. This allows handling of obscure globals cases.
|
|
?depends l_depends
|
|
|
The list of contexts on which the code under analysis depends. This is used for loading external definitions files.
|
|
?rulesFile t_rulesFile
|
|
|
The name of an additional rules file to be read prior to processing the code.
|
|
?ignores l_ignoresMessageList
|
|
|
The list of message IDs to ignore. These messages are neither printed by SKILL Lint nor counted in the summary report at the end of the run. Message groups as well as individual messages can be ignored. For example, all messages about improving the efficiency of SKILL code can be turned off by passing in the list '(hint suggestion).
|
|
?checkNlambda g_checkNlambda
|
|
|
Specifies whether to check the arguments to nlambda functions. This option should only be used by highly experienced users, as it usually leads to results that are difficult to interpret. This option defaults to nil.
|
|
?noPrintLog g_noPrintLog
|
|
|
Controls whether printing to the screen/ciw should take place. Even if switched off, printing of start and stop messages will take place. This option defaults to nil.
|
|
?useGlobalIgnores g_useGlobalIgnores
|
|
|
Controls whether to ignore those message IDs listed in the global variable skGlobalIgnores. This option is useful when the list of messages to ignore is constant and is held in a global list somewhere. This option defaults to nil.
|
|
?useGlobalRulesFileList g_useGlobalRulesFileList
|
|
|
Specifies whether to use the rules file listed in the global variable skGlobalRulesFiles. This option defaults to nil.
|
|
?useDisableMessages g_useDisableMessages
|
|
|
Controls whether to turn on or off disable messages to allow integrators to override message suppression put in the code. This option defaults to t.
|
|
?checkCdsFuncs g_checkCdsFuncs
|
|
|
Specifies whether to check both Cadence private and public functions (that is, force setting both checkPvtFuncs and checkPubFuncs to t). This option defaults to nil.
|
|
?checkPvtFuncs g_checkPvtFuncs
|
|
|
Controls whether to check Cadence private functions. This option defaults to nil.
|
|
?checkPubFuncs g_checkPubFuncs
|
|
|
Specifies whether to check Cadence public functions. This option defaults to nil.
|
|
?prefixes l_prefixes
|
|
|
The list of symbols whose print names are matched with variable names. The list may consist of functions and global variables not covered by the standard global list and the prefix list. This allows for obscure cases of globals to be handled.
|
|
?checkCdsPrefixes g_checkCdsPrefixes
|
|
|
Specifies whether the prefix checking is for Cadence public function/variables start with a lower-case character. If this argument is not set to t (that is, by default), the checking is for customers’ function/variables prefixes start with an upper-case character. This option is for Cadence internal use only. This option defaults to nil.
|
|
?checkFuncPrefixes g_checkFuncPrefixes
|
|
|
Controls whether function prefixes should also be checked. If this argument is not set to t (that is, by default), only customers’ global variable prefixes are checked. This option defaults to nil.
|
|
?tabulate g_tabulate
|
|
|
Controls whether to tabulate all the functions being called. This option defaults to nil.
|
|
?skPath t_skPath
|
The user-specified SKILL path to the file to be processed. If the option is specified, SKILL Lint will only search this path. Otherwise, the home directory will be searched first by default.
|
|
?codeVersion t_release
|
|
|
The release version of code being checked (for example, 581 for IC6.1.8). If this argument is specified all automatically generated function change messages (from cdsFuncs.cxt) that are equal to or before the release specified (through this argument) will be filtered out (that is, will not be reported). By default, all automatically generated function change messages (from cdsFuncs.cxt) will be reported.
|
|
|
This argument is useful when the user wants to restrict reporting of function change messages which occurred after the release for which the code being checked was written. When users check the code in IC6.1.8 they will not be interesting in seeing the information about the change in IC6.1.7, since that was before they wrote the code (or perhaps before it was migrated).
|
|
|
Specifying this argument will filter out both function changed and function deleted messages.
|
Value Returned
|
t
|
If SKILL Lint passed 100%.
|
|
nil
|
If SKILL Lint failed. SKILL Lint fails if there are any error or warning messages.
|
Examples
Runs SKILL Lint over the testfns.il file and prints the output to the CIW.
sklint(?file "~/testfns.il")
Runs SKILL Lint over all files loaded by your_install_dir/pvt/etc/context/dbRead/startup.il.
sklint(?context "dbRead")
Runs SKILL Lint over the testfns.il file and prints the output to the testfns.lint file but not to the CIW.
sklint(?file "~/testfns.il" ?outputFile "~/testfns.lint" ?noPrintLog t)
Runs SKILL Lint over the testfns.il file and treats all global variables that start with the prefix tfns as acceptable global variables. In the given example, SKILL Lint does not print any hints or suggestions for how to make the user’s SKILL code more efficient.
sklint(?file "~/testfns.il" ?prefixes '(tfns) ?ignores '(hint suggestion))
Runs SKILL Lint to check prefixes:
sklint( ?file "file.il" ?prefixes ’(Pre MIX) )
Checks non-Cadence variable prefixes only.
sklint( ?file "file.il" ?checkFuncPrefixes t ?prefixes ’(Pre MIX) )
Checks both non-Cadence function and variable prefixes.
sklint( ?file "file.il" ?checkCdsPrefixes t ?prefixes ’(le ge) )
Checks Cadence variable prefixes only.
sklint( ?file "file.il" ?checkCdsPrefixes t ?checkFuncPrefixes t ?prefixes ’(le ge) )
Checks both Cadence function and variable prefixes.
Runs SKILL Lint on code that contain macros:
sklint ?file "dep.il file.il" ?depends ’("dep.il")
where dep.il should contain macro definition(s) only, while file.il contains the code that call the macro(s) as defined in dep.il. The order of the files specifying in the ?file option is important that the file(s) contain the macro definition(s) have to be specified first. (that is, dep.il must be listed before file.il).
Use this command for linting code where the macro definition(s) are contained in different file(s).
sklint ?file "file2.il" ?depends ’("file2.il")
where file2.il contains both the macro definition(s) and the code that call the macro(s). The macro definition(s) code have to be placed on top of the code that call the macro(s) inside file2.il.
Related Topics
Lint Functions
skDisableMessage
skIgnoreMessage
SKILL Lint messages
Message Groups
Return to top