mirror of
https://github.com/sasjs/lint.git
synced 2025-12-11 01:44:36 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ccb122744 | ||
|
|
884480d3df | ||
|
|
1b940497aa |
23
README.md
23
README.md
@@ -44,7 +44,7 @@ The SASjs framework recommends the use of Doxygen headers for describing all typ
|
||||
* 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.
|
||||
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 was the result of a poll with over 300 votes.
|
||||
|
||||
* Default: true
|
||||
* Severity: WARNING
|
||||
@@ -72,13 +72,13 @@ Code becomes far more readable when line lengths are short. The most compelling
|
||||
|
||||
In batch mode, long SAS code lines may also be truncated, causing hard-to-detect errors.
|
||||
|
||||
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.
|
||||
We strongly recommend a line length limit, and set the bar at 80. To turn this feature off, set the value to 0.
|
||||
|
||||
* 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.
|
||||
Where macros are defined inside other macros, they are recompiled every time the outer macro is invoked. Hence, it is widely considered inefficient, and bad practice, to nest macro definitions.
|
||||
|
||||
* Default: true
|
||||
* Severity: WARNING
|
||||
@@ -95,7 +95,7 @@ In addition, when such files are used in URLs, they are often padded with a mess
|
||||
* 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).
|
||||
Whilst there are some arguments for using tabs to indent (such as the ability to set your own indentation width, and to reduce character count) there are many, many, many developers who think otherwise. We're in that camp. Sorry (not sorry).
|
||||
|
||||
* Default: true
|
||||
* Severity: WARNING
|
||||
@@ -116,14 +116,19 @@ This will highlight lines with trailing spaces. Trailing spaces serve no useful
|
||||
|
||||
A formatter will automatically apply rules when you hit SAVE, which can save a LOT of time.
|
||||
|
||||
We're looking to implement the following rules:
|
||||
We've already implemented the following rules:
|
||||
|
||||
* Remove trailing spaces
|
||||
* Change tabs to spaces
|
||||
* Add the macro name to the %mend statement
|
||||
* Add a doxygen header template if none exists
|
||||
* Remove trailing spaces
|
||||
|
||||
Later we will investigate some harder stuff, such as automatic indentation and code layout
|
||||
We're looking to implement the following rules:
|
||||
|
||||
* Change tabs to spaces
|
||||
* zap gremlins
|
||||
* fix line endings
|
||||
|
||||
We are also investigating some harder stuff, such as automatic indentation and code layout
|
||||
|
||||
## Sponsorship & Contributions
|
||||
|
||||
@@ -133,7 +138,7 @@ Contact [Allan Bowe](https://www.linkedin.com/in/allanbowe/) for further details
|
||||
|
||||
## SAS 9 Health check
|
||||
|
||||
The SASjs Linter (and formatter) is a great way to de-risk and accelerate the delivery of SAS code into production environments. However, code is just one part of a SAS estate. If you are running SAS 9, you may be interested to know what 'gremlins' are lurking in your system. Maybe you are preparing for a migration. Maybe you are preparing to hand over the control of your environment. Either way, an assessment of your existing system would put minds at rest and pro-actively identify trouble spots.
|
||||
The SASjs Linter (and formatter) is a great way to de-risk and accelerate the delivery of SAS code into production environments. However, code is just one part of a SAS estate. If you are running SAS 9, you may be interested to know what 'gremlins' are lurking in your SAS 9 system. Maybe you are preparing for a migration. Maybe you are preparing to hand over the control of your environment. Either way, an assessment of your existing system would put minds at rest and pro-actively identify trouble spots.
|
||||
|
||||
The SAS 9 Health Check is a 'plug & play' product, that uses the [SAS 9 REST API](https://sas9api.io) to run hundreds of metadata and system checks to identify common problems. The checks are non-invasive, and becuase it is a client app, there is NOTHING TO INSTALL on your SAS server. We offer this assessment for a low fixed fee, and if you engage our (competitively priced) services to address the issues we highlight, then the assessment is free.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"package:lib": "npm run build && cp ./package.json build && cp README.md build && cd build && npm version \"5.0.0\" && npm pack",
|
||||
"lint:fix": "npx prettier --write '{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}'",
|
||||
"lint": "npx prettier --check '{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}'",
|
||||
"postinstall": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true"
|
||||
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
Reference in New Issue
Block a user