Linters are programs that carry out static source code analysis, detecting certain bugs, coding rule deviations, and other issues. Linters also detect redundant or error-prone constructs that are nevertheless, strictly speaking, legal. Potential performance optimizations can also be checked by linters. SASLint is a modular linter for the SASĀ® language consisting of a parser module, an analysis module that includes a list of rules, and a reporting module that displays issues found. It is possible to include and exclude rules, as well as develop your own rules, all of which makes the linter very flexible for any team with its own list of requirements regarding the source code and programming standards. The parser for SAS language grammar is based on the ANTLR Java parser. The tool is written in Java and SAS, which is why it can be integrated into any SAS environment.

$ saslint
Inspecting 10 files

Offences: E:22-322: Missing ';' at the end of the assignment statement.
    f = cat(3, 5, 3 + 5)
                        ^ E:22-322: Extra closing ')'.
    f = cat(3, 5, 3 + 5));
                        ^ E:79-322: Missing closing ')'.
    f = cat(3, 5, 3 + 5;
                       ^ W: Expression is always true.
    if length(str) > 0 then do;
       ^^^^^^^^^^^^^^^ N: This DATA step uses no executable statements and can be replaced by the DATASETS procedure.
data class;

10 files inspected, 5 offenses detected.

Read the paper. Contact the
Comming soon...