mirror of
https://github.com/sasjs/lint.git
synced 2025-12-10 17:34:36 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8031468926 | ||
|
|
1e25eab783 | ||
|
|
9623828fc8 | ||
| debeff7929 | |||
| c210699954 |
@@ -169,13 +169,6 @@ SASjs is an open source framework! Contributions are welcomed. If you would li
|
|||||||
|
|
||||||
Contact [Allan Bowe](https://www.linkedin.com/in/allanbowe/) for further details.
|
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 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.
|
|
||||||
|
|
||||||
Contact [Allan Bowe](https://www.linkedin.com/in/allanbowe/) for further details.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"default": {
|
"default": {
|
||||||
"noEncodedPasswords": true,
|
"noEncodedPasswords": true,
|
||||||
"hasDoxygenHeader": true,
|
"hasDoxygenHeader": true,
|
||||||
|
"defaultHeader": "/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding} <h4> SAS Macros </h4>{lineEnding}**/",
|
||||||
"hasMacroNameInMend": false,
|
"hasMacroNameInMend": false,
|
||||||
"hasMacroParentheses": true,
|
"hasMacroParentheses": true,
|
||||||
"indentationMultiple": 2,
|
"indentationMultiple": 2,
|
||||||
@@ -18,10 +19,7 @@
|
|||||||
"noTrailingSpaces": true,
|
"noTrailingSpaces": true,
|
||||||
"lineEndings": "lf",
|
"lineEndings": "lf",
|
||||||
"strictMacroDefinition": true,
|
"strictMacroDefinition": true,
|
||||||
"ignoreList": [
|
"ignoreList": ["sajsbuild", "sasjsresults"]
|
||||||
"sajsbuild",
|
|
||||||
"sasjsresults"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"examples": [
|
"examples": [
|
||||||
{
|
{
|
||||||
@@ -58,6 +56,14 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"examples": [true, false]
|
"examples": [true, false]
|
||||||
},
|
},
|
||||||
|
"defaultHeader": {
|
||||||
|
"$id": "#/properties/defaultHeader",
|
||||||
|
"type": "string",
|
||||||
|
"title": "defaultHeader",
|
||||||
|
"description": "This sets the default program header - applies when a SAS program does NOT begin with `/**`.",
|
||||||
|
"default": "/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding} <h4> SAS Macros </h4>{lineEnding}**/",
|
||||||
|
"examples": []
|
||||||
|
},
|
||||||
"hasMacroNameInMend": {
|
"hasMacroNameInMend": {
|
||||||
"$id": "#/properties/hasMacroNameInMend",
|
"$id": "#/properties/hasMacroNameInMend",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
import { LintConfig } from '../types'
|
||||||
import { getLintConfig } from '../utils'
|
import { getLintConfig } from '../utils'
|
||||||
import { processText } from './shared'
|
import { processText } from './shared'
|
||||||
|
|
||||||
export const formatText = async (text: string) => {
|
export const formatText = async (text: string, configuration?: LintConfig) => {
|
||||||
const config = await getLintConfig()
|
const config = configuration || (await getLintConfig())
|
||||||
return processText(text, config)
|
return processText(text, config)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const processLine = (config: LintConfig, line: string): string => {
|
|||||||
config.lineLintRules
|
config.lineLintRules
|
||||||
.filter((r) => !!r.fix)
|
.filter((r) => !!r.fix)
|
||||||
.forEach((rule) => {
|
.forEach((rule) => {
|
||||||
processedLine = rule.fix!(line)
|
processedLine = rule.fix!(line, config)
|
||||||
})
|
})
|
||||||
|
|
||||||
return processedLine
|
return processedLine
|
||||||
|
|||||||
Reference in New Issue
Block a user