diff --git a/README.md b/README.md index 25e03a0..46178cf 100644 --- a/README.md +++ b/README.md @@ -32,32 +32,38 @@ Configuration is via a `.sasjslint` file with the following structure (these are This will highlight any rows that contain a `{sas00X}` type password, or `{sasenc}`. These passwords (especially 001 and 002) are NOT secure, and should NEVER be pushed to source control or saved to the filesystem without special permissions applied. -Severity: ERROR +* Default: true +* Severity: ERROR #### hasDoxygenHeader The SASjs framework recommends the use of Doxygen headers for describing all types of SAS program. This check will identify files where a doxygen header does not begin in the first line. -Severity: WARNING +* Default: true +* Severity: WARNING #### hasMacroNameInMend -The addition of the macro name in the `%mend` statement is optional, but can approve readability in large programs. A discussion on this topic can be found [here](https://www.linkedin.com/posts/allanbowe_sas-sasapps-sasjs-activity-6783413360781266945-1-7m). The default setting will be the result of a popular vote by around 300 people. Default: false (for now) +The addition of the macro name in the `%mend` statement is optional, but can approve readability in large programs. A discussion on this topic can be found [here](https://www.linkedin.com/posts/allanbowe_sas-sasapps-sasjs-activity-6783413360781266945-1-7m). The default setting will be the result of a popular vote by around 300 people. -Severity: WARNING +* Default: false (for now) +* Severity: WARNING #### hasMacroParentheses -As per the example [here](https://github.com/sasjs/lint/issues/20), macros defined without parentheses cause problems if that macro is ever extended (it's not possible to reliably extend that macro without potentially breaking some code that has used the macro). It's better to always define parentheses, even if they are not used. Default: true +As per the example [here](https://github.com/sasjs/lint/issues/20), macros defined without parentheses cause problems if that macro is ever extended (it's not possible to reliably extend that macro without potentially breaking some code that has used the macro). It's better to always define parentheses, even if they are not used. This check will also throw a warning if there are spaces between the macro name and the opening parenthesis. -Severity: WARNING +* Default: true +* Severity: WARNING #### indentationMultiple This will check each line to ensure that the count of leading spaces can be divided cleanly by this multiple. -Severity: WARNING +* Default: 2 +* Severity: WARNING #### lowerCaseFileNames On *nix systems, it is imperative that autocall macros are in lowercase. When sharing code between windows and *nix systems, the difference in case sensitivity can also be a cause of lost developer time. For this reason, we recommend that sas filenames are always lowercase. -Severity: WARNING +* Default: true +* Severity: WARNING #### maxLineLength Code becomes far more readable when line lengths are short. The most compelling reason for short line lengths is to avoid the need to scroll when performing a side-by-side 'compare' between two files (eg as part of a GIT feature branch review). A longer discussion on optimal code line length can be found [here](https://stackoverflow.com/questions/578059/studies-on-optimal-code-width) @@ -66,12 +72,14 @@ In batch mode, long SAS code lines may also be truncated, causing hard-to-detect For this reason we strongly recommend a line length limit, and we set the bar at 80. To turn this feature off, set the value to 0. -Severity: WARNING +* Default: 80 +* Severity: WARNING #### noNestedMacros -Where macros are defined inside other macros, they are recompiled every time the outer maro is invoked. Hence, it is widely considered inefficient, and bad practice, to nest macro definitions. Default: true +Where macros are defined inside other macros, they are recompiled every time the outer maro is invoked. Hence, it is widely considered inefficient, and bad practice, to nest macro definitions. -Severity: WARNING +* Default: true +* Severity: WARNING #### noSpacesInFileNames The 'beef' we have with spaces in filenames is twofold: @@ -81,24 +89,25 @@ The 'beef' we have with spaces in filenames is twofold: In addition, when such files are used in URLs, they are often padded with a messy "%20" type quotation. And of course, for macros (where the macro should match the filename) then spaces are simply not valid. -Severity: WARNING +* Default: true +* Severity: WARNING #### noTabIndentation Whilst there are some arguments for using tabs to indent (such as the ability to set your own indentation width, and to save on characters) there are many, many, many developers who think otherwise. We're in that camp. Sorry (not sorry). -Severity: WARNING +* Default: true +* Severity: WARNING #### noTrailingSpaces This will highlight lines with trailing spaces. Trailing spaces serve no useful purpose in a SAS program. -severity: WARNING +* Default: true +* severity: WARNING ### Upcoming Linting Rules: * `noTabs` -> does what it says on the tin * `noGremlins` -> identifies all invisible characters, other than spaces / tabs / line endings. If you really need that bell character, use a hex literal! -* `hasMendName` -> show the macro name in the %mend statement -* `noNestedMacros` -> highlight where macros are defined inside other macros * `lineEndings` -> set a standard line ending, such as LF or CRLF ## SAS Formatter