@sasjs/lint 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/package.json +22 -3
- package/rules/file/hasDoxygenHeader.d.ts +0 -3
- package/rules/file/hasDoxygenHeader.js +88 -37
- package/rules/file/hasDoxygenHeader.js.map +1 -1
- package/rules/file/index.d.ts +1 -0
- package/rules/file/index.js +3 -1
- package/rules/file/index.js.map +1 -1
- package/rules/file/noNestedCommentsInHeader.d.ts +6 -0
- package/rules/file/noNestedCommentsInHeader.js +105 -0
- package/rules/file/noNestedCommentsInHeader.js.map +1 -0
- package/sasjslint-schema.json +17 -0
- package/types/LintConfig.js +3 -0
- package/types/LintConfig.js.map +1 -1
- package/utils/getLintConfig.d.ts +1 -0
- package/utils/getLintConfig.js +1 -0
- package/utils/getLintConfig.js.map +1 -1
- package/utils/getPosition.d.ts +14 -0
- package/utils/getPosition.js +25 -0
- package/utils/getPosition.js.map +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/index.js.map +1 -1
- package/.all-contributorsrc +0 -123
- package/.git-hooks/commit-msg +0 -18
- package/.git-hooks/pre-commit +0 -18
- package/.github/CONTRIBUTING.md +0 -201
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -21
- package/.github/dependabot.yml +0 -7
- package/.github/workflows/audit-watch.yml +0 -68
- package/.github/workflows/build.yml +0 -66
- package/.github/workflows/mutation-pr.yml +0 -69
- package/.github/workflows/mutation-weekly.yml +0 -92
- package/.github/workflows/publish.yml +0 -169
- package/.gitpod.yml +0 -8
- package/.pre-commit-config.yaml +0 -16
- package/.prettierrc +0 -6
- package/.sasjslint +0 -13
- package/jest.config.js +0 -62
- package/jest.stryker.config.js +0 -17
- package/mutation-baseline.json +0 -30
- package/scripts/audit-watch.mjs +0 -249
- package/scripts/generate-macro-names.mjs +0 -101
- package/scripts/mutation-gate.mjs +0 -390
- package/stryker.conf.json +0 -19
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ Configuration is via a `.sasjslint` file with the following structure (these are
|
|
|
38
38
|
"maxLineLength": 80,
|
|
39
39
|
"noEncodedPasswords": true,
|
|
40
40
|
"noGremlins": true,
|
|
41
|
+
"noNestedCommentsInHeader": true,
|
|
41
42
|
"noNestedMacros": true,
|
|
42
43
|
"noSingleAsteriskComments": false,
|
|
43
44
|
"noSpacesInFileNames": true,
|
|
@@ -138,7 +139,9 @@ If creating a new value, use `{lineEnding}` instead of `\n`, eg as follows:
|
|
|
138
139
|
|
|
139
140
|
### hasDoxygenHeader
|
|
140
141
|
|
|
141
|
-
The SASjs framework recommends the use of Doxygen headers for describing all types of SAS program. This check
|
|
142
|
+
The SASjs framework recommends the use of Doxygen headers for describing all types of SAS program. This check identifies files where a Doxygen header does not begin on the first line, where it opens with a single asterisk, and where it closes with one.
|
|
143
|
+
|
|
144
|
+
The closing half matters beyond style. This rule set and `sasjs compile` both locate the header's end by its `**/` terminator, so a header closed with a plain `*/` has no end they can find - a comment inside such a header can truncate it without being reported by [`noNestedCommentsInHeader`](#nonestedcommentsinheader). The fix widens the close marker to `**/`, which puts the header back where that check can see it. A header whose body already holds a comment opener is left alone: the first close marker may belong to that comment, and that decision belongs to the author.
|
|
142
145
|
|
|
143
146
|
- Default: true
|
|
144
147
|
- Severity: WARNING
|
|
@@ -310,6 +313,17 @@ The list of characters can be found in this file: [https://github.com/sasjs/lint
|
|
|
310
313
|
- Default: true
|
|
311
314
|
- Severity: WARNING
|
|
312
315
|
|
|
316
|
+
### noNestedCommentsInHeader
|
|
317
|
+
|
|
318
|
+
A doxygen header is a SAS block comment, and SAS block comments do not nest: the first close marker ends the comment. A `/* ... */` inside the header therefore closes the header early, and the rest of it - `@param` lines, and any code in a usage example - is compiled as SAS. Header text that holds `/*/`, such as a glob like `src/*/file.sas`, ends the header the same way.
|
|
319
|
+
|
|
320
|
+
This rule reports such a header as a warning. `sasjs compile` fails on the truncation (sasjs/utils#288), so the rule surfaces it in the editor rather than in the build; set `severityLevel` to `error` to make `sasjs lint` fail on it as well.
|
|
321
|
+
|
|
322
|
+
Two boundaries are deliberate. Only the header a file opens with is inspected, which is the one `sasjs compile` reads - a file that opens with code has no header to truncate, and `hasDoxygenHeader` covers that shape. And the header's end is identified by its `**/` terminator standing alone on its line, so a header closed with a plain `*/` is not inspected: nothing there says the header was meant to continue. [`hasDoxygenHeader`](#hasdoxygenheader) reports that closing style and its fix writes the `**/` form, which is what puts the header back in view here. The same bound has one cost worth knowing: a truncated header whose own text holds a line-leading `/**` is not reported, because that opener is indistinguishable from a second header in the same file.
|
|
323
|
+
|
|
324
|
+
- Default: true
|
|
325
|
+
- Severity: WARNING
|
|
326
|
+
|
|
313
327
|
### noNestedMacros
|
|
314
328
|
|
|
315
329
|
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.
|
package/package.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"lint": "npx prettier --check \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}\"",
|
|
16
16
|
"mutation": "stryker run",
|
|
17
17
|
"mutation:changed": "node scripts/mutation-gate.mjs pr",
|
|
18
|
-
"mutation:watch": "node scripts/mutation-gate.mjs weekly"
|
|
18
|
+
"mutation:watch": "node scripts/mutation-gate.mjs weekly",
|
|
19
|
+
"check:package": "node scripts/checkPackageContents.mjs"
|
|
19
20
|
},
|
|
20
21
|
"publishConfig": {
|
|
21
22
|
"access": "public"
|
|
@@ -74,11 +75,29 @@
|
|
|
74
75
|
"ts-jest": "29.4.14",
|
|
75
76
|
"typescript": "6.0.3"
|
|
76
77
|
},
|
|
78
|
+
"files": [
|
|
79
|
+
"index.js",
|
|
80
|
+
"index.js.map",
|
|
81
|
+
"index.d.ts",
|
|
82
|
+
"checkNodeVersion.js",
|
|
83
|
+
"formatExample.js",
|
|
84
|
+
"formatExample.js.map",
|
|
85
|
+
"formatExample.d.ts",
|
|
86
|
+
"lintExample.js",
|
|
87
|
+
"lintExample.js.map",
|
|
88
|
+
"lintExample.d.ts",
|
|
89
|
+
"format",
|
|
90
|
+
"lint",
|
|
91
|
+
"rules",
|
|
92
|
+
"types",
|
|
93
|
+
"utils",
|
|
94
|
+
"sasjslint-schema.json"
|
|
95
|
+
],
|
|
77
96
|
"dependencies": {
|
|
78
|
-
"@sasjs/utils": "4.0.0",
|
|
97
|
+
"@sasjs/utils": "^4.0.0",
|
|
79
98
|
"ignore": "7.0.11"
|
|
80
99
|
},
|
|
81
|
-
"version": "4.
|
|
100
|
+
"version": "4.4.0",
|
|
82
101
|
"devEngines": {
|
|
83
102
|
"runtime": {
|
|
84
103
|
"name": "node",
|
|
@@ -6,65 +6,116 @@ const LineEndings_1 = require("../../types/LineEndings");
|
|
|
6
6
|
const LintRuleType_1 = require("../../types/LintRuleType");
|
|
7
7
|
const Severity_1 = require("../../types/Severity");
|
|
8
8
|
const getLintConfig_1 = require("../../utils/getLintConfig");
|
|
9
|
+
const getPosition_1 = require("../../utils/getPosition");
|
|
9
10
|
const name = 'hasDoxygenHeader';
|
|
10
|
-
const description = 'Enforce
|
|
11
|
+
const description = 'Enforce a Doxygen header at the start of each file, in the /** ... **/ form.';
|
|
11
12
|
const message = 'File missing Doxygen header';
|
|
12
13
|
const messageForSingleAsterisk = 'File not following Doxygen header style, use double asterisks';
|
|
13
|
-
const
|
|
14
|
+
const messageForSingleAsteriskClose = 'File not following Doxygen header style, close with double asterisks';
|
|
15
|
+
const CLOSE = '*/';
|
|
16
|
+
/**
|
|
17
|
+
* Finds a header that opens in the Doxygen form but closes with a single
|
|
18
|
+
* asterisk, which is the closer half of the same style the opening check
|
|
19
|
+
* enforces.
|
|
20
|
+
*
|
|
21
|
+
* A header that holds a comment opener of its own is left alone: the first
|
|
22
|
+
* close marker may belong to that comment rather than to the header, and that
|
|
23
|
+
* ambiguity belongs to the author, not to a formatter.
|
|
24
|
+
*
|
|
25
|
+
* @returns the index of the close marker to widen, or `null`.
|
|
26
|
+
*/
|
|
27
|
+
const singleAsteriskClose = (value, start) => {
|
|
28
|
+
const close = value.indexOf(CLOSE, start + 2);
|
|
29
|
+
if (close === -1)
|
|
30
|
+
return null;
|
|
31
|
+
// Already closed in the Doxygen form.
|
|
32
|
+
if (value[close - 1] === '*')
|
|
33
|
+
return null;
|
|
34
|
+
// A comment opener before the close makes the extent ambiguous.
|
|
35
|
+
if (value.slice(start + 2, close).includes('/*'))
|
|
36
|
+
return null;
|
|
37
|
+
return close;
|
|
38
|
+
};
|
|
39
|
+
const diagnose = (value, config) => {
|
|
14
40
|
var _a;
|
|
15
41
|
const severity = (config === null || config === void 0 ? void 0 : config.severityLevel[name]) || Severity_1.Severity.Warning;
|
|
16
42
|
try {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
|
|
43
|
+
const start = value.search(/\S/);
|
|
44
|
+
if (value.trimStart().startsWith('/**')) {
|
|
45
|
+
const close = singleAsteriskClose(value, start);
|
|
46
|
+
if (close === null)
|
|
47
|
+
return null;
|
|
48
|
+
const { lineNumber, columnNumber } = (0, getPosition_1.getPosition)(value, close);
|
|
49
|
+
return {
|
|
50
|
+
message: messageForSingleAsteriskClose,
|
|
51
|
+
lineNumber,
|
|
52
|
+
startColumnNumber: columnNumber,
|
|
53
|
+
endColumnNumber: columnNumber + 2,
|
|
54
|
+
severity,
|
|
55
|
+
close
|
|
56
|
+
};
|
|
57
|
+
}
|
|
20
58
|
const hasFileHeaderWithSingleAsterisk = value.trimStart().startsWith('/*');
|
|
21
59
|
if (hasFileHeaderWithSingleAsterisk)
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
lineNumber: ((_a = value.split('/*')[0].match(/\r\n|\n/g)) !== null && _a !== void 0 ? _a : []).length + 1,
|
|
26
|
-
startColumnNumber: 1,
|
|
27
|
-
endColumnNumber: 1,
|
|
28
|
-
severity
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
return [
|
|
32
|
-
{
|
|
33
|
-
message,
|
|
34
|
-
lineNumber: 1,
|
|
60
|
+
return {
|
|
61
|
+
message: messageForSingleAsterisk,
|
|
62
|
+
lineNumber: ((_a = value.split('/*')[0].match(/\r\n|\n/g)) !== null && _a !== void 0 ? _a : []).length + 1,
|
|
35
63
|
startColumnNumber: 1,
|
|
36
64
|
endColumnNumber: 1,
|
|
37
|
-
severity
|
|
38
|
-
|
|
39
|
-
|
|
65
|
+
severity,
|
|
66
|
+
close: -1
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
message,
|
|
70
|
+
lineNumber: 1,
|
|
71
|
+
startColumnNumber: 1,
|
|
72
|
+
endColumnNumber: 1,
|
|
73
|
+
severity,
|
|
74
|
+
close: -1
|
|
75
|
+
};
|
|
40
76
|
}
|
|
41
77
|
catch (e) {
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
];
|
|
78
|
+
return {
|
|
79
|
+
message,
|
|
80
|
+
lineNumber: 1,
|
|
81
|
+
startColumnNumber: 1,
|
|
82
|
+
endColumnNumber: 1,
|
|
83
|
+
severity,
|
|
84
|
+
close: -1
|
|
85
|
+
};
|
|
51
86
|
}
|
|
52
87
|
};
|
|
88
|
+
const test = (value, config) => {
|
|
89
|
+
const diagnosis = diagnose(value, config);
|
|
90
|
+
if (!diagnosis)
|
|
91
|
+
return [];
|
|
92
|
+
return [
|
|
93
|
+
{
|
|
94
|
+
message: diagnosis.message,
|
|
95
|
+
lineNumber: diagnosis.lineNumber,
|
|
96
|
+
startColumnNumber: diagnosis.startColumnNumber,
|
|
97
|
+
endColumnNumber: diagnosis.endColumnNumber,
|
|
98
|
+
severity: diagnosis.severity
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
};
|
|
53
102
|
const fix = (value, config) => {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
103
|
+
const diagnosis = diagnose(value, config);
|
|
104
|
+
if (!diagnosis)
|
|
56
105
|
return value;
|
|
57
|
-
|
|
58
|
-
else if (result[0].message == messageForSingleAsterisk)
|
|
106
|
+
if (diagnosis.message == messageForSingleAsterisk)
|
|
59
107
|
return value.replace('/*', '/**');
|
|
108
|
+
if (diagnosis.message == messageForSingleAsteriskClose)
|
|
109
|
+
return `${value.slice(0, diagnosis.close)}*${value.slice(diagnosis.close)}`;
|
|
60
110
|
config = config || new types_1.LintConfig(getLintConfig_1.DefaultLintConfiguration);
|
|
61
111
|
const lineEndingConfig = (config === null || config === void 0 ? void 0 : config.lineEndings) || LineEndings_1.LineEndings.LF;
|
|
62
112
|
const lineEnding = lineEndingConfig === LineEndings_1.LineEndings.LF ? '\n' : '\r\n';
|
|
63
113
|
return `${config === null || config === void 0 ? void 0 : config.defaultHeader.replace(/{lineEnding}/g, lineEnding)}${lineEnding}${value}`;
|
|
64
114
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
115
|
+
// Lint rule that checks for a Doxygen header in the double-asterisk form at the
|
|
116
|
+
// start of a given file: the opening check, the closing check, and the fix that
|
|
117
|
+
// widens a single-asterisk close so the truncation rule can locate the header's
|
|
118
|
+
// end.
|
|
68
119
|
exports.hasDoxygenHeader = {
|
|
69
120
|
type: LintRuleType_1.LintRuleType.File,
|
|
70
121
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasDoxygenHeader.js","sourceRoot":"","sources":["../../../src/rules/file/hasDoxygenHeader.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"hasDoxygenHeader.js","sourceRoot":"","sources":["../../../src/rules/file/hasDoxygenHeader.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,yDAAqD;AAErD,2DAAuD;AACvD,mDAA+C;AAC/C,6DAAoE;AACpE,yDAAqD;AAErD,MAAM,IAAI,GAAG,kBAAkB,CAAA;AAC/B,MAAM,WAAW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;IACJ,WAAW;IACX,OAAO;IACP,IAAI;IACJ,GAAG;CACJ,CAAA"}
|
package/rules/file/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { hasDoxygenHeader } from './hasDoxygenHeader';
|
|
|
2
2
|
export { hasMacroNameInMend } from './hasMacroNameInMend';
|
|
3
3
|
export { hasMacroParentheses } from './hasMacroParentheses';
|
|
4
4
|
export { lineEndings } from './lineEndings';
|
|
5
|
+
export { noNestedCommentsInHeader } from './noNestedCommentsInHeader';
|
|
5
6
|
export { noNestedMacros } from './noNestedMacros';
|
|
6
7
|
export { noUndeclaredMacros } from './noUndeclaredMacros';
|
|
7
8
|
export { noUnusedMacros } from './noUnusedMacros';
|
package/rules/file/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.noSingleAsteriskComments = exports.hasRequiredMacroOptions = exports.strictMacroDefinition = exports.noUnusedLibnames = exports.noUnusedMacros = exports.noUndeclaredMacros = exports.noNestedMacros = exports.lineEndings = exports.hasMacroParentheses = exports.hasMacroNameInMend = exports.hasDoxygenHeader = void 0;
|
|
3
|
+
exports.noSingleAsteriskComments = exports.hasRequiredMacroOptions = exports.strictMacroDefinition = exports.noUnusedLibnames = exports.noUnusedMacros = exports.noUndeclaredMacros = exports.noNestedMacros = exports.noNestedCommentsInHeader = exports.lineEndings = exports.hasMacroParentheses = exports.hasMacroNameInMend = exports.hasDoxygenHeader = void 0;
|
|
4
4
|
var hasDoxygenHeader_1 = require("./hasDoxygenHeader");
|
|
5
5
|
Object.defineProperty(exports, "hasDoxygenHeader", { enumerable: true, get: function () { return hasDoxygenHeader_1.hasDoxygenHeader; } });
|
|
6
6
|
var hasMacroNameInMend_1 = require("./hasMacroNameInMend");
|
|
@@ -9,6 +9,8 @@ var hasMacroParentheses_1 = require("./hasMacroParentheses");
|
|
|
9
9
|
Object.defineProperty(exports, "hasMacroParentheses", { enumerable: true, get: function () { return hasMacroParentheses_1.hasMacroParentheses; } });
|
|
10
10
|
var lineEndings_1 = require("./lineEndings");
|
|
11
11
|
Object.defineProperty(exports, "lineEndings", { enumerable: true, get: function () { return lineEndings_1.lineEndings; } });
|
|
12
|
+
var noNestedCommentsInHeader_1 = require("./noNestedCommentsInHeader");
|
|
13
|
+
Object.defineProperty(exports, "noNestedCommentsInHeader", { enumerable: true, get: function () { return noNestedCommentsInHeader_1.noNestedCommentsInHeader; } });
|
|
12
14
|
var noNestedMacros_1 = require("./noNestedMacros");
|
|
13
15
|
Object.defineProperty(exports, "noNestedMacros", { enumerable: true, get: function () { return noNestedMacros_1.noNestedMacros; } });
|
|
14
16
|
var noUndeclaredMacros_1 = require("./noUndeclaredMacros");
|
package/rules/file/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/file/index.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/file/index.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.noNestedCommentsInHeader = void 0;
|
|
4
|
+
const LintRuleType_1 = require("../../types/LintRuleType");
|
|
5
|
+
const Severity_1 = require("../../types/Severity");
|
|
6
|
+
const getPosition_1 = require("../../utils/getPosition");
|
|
7
|
+
const name = 'noNestedCommentsInHeader';
|
|
8
|
+
const description = 'Disallow a close marker inside the Doxygen header. SAS block comments do not nest and end at the first close marker, so anything after one in the header is compiled as SAS. The header end is identified by its `**/` terminator standing alone on its line, so a project that closes headers with a plain close marker is not inspected.';
|
|
9
|
+
const message = 'Doxygen header contains a nested block comment';
|
|
10
|
+
const messageForTerminator = 'Doxygen header contains /*/, which SAS reads as a comment terminator';
|
|
11
|
+
const messageForText = 'Doxygen header contains a close marker as text';
|
|
12
|
+
const CLOSE = '*/';
|
|
13
|
+
const TERMINATOR = '**/';
|
|
14
|
+
const LATER_HEADER = /^[ \t]*\/\*\*/m;
|
|
15
|
+
// Finds the double-asterisk terminator that belongs to this header.
|
|
16
|
+
//
|
|
17
|
+
// It has to stand alone on its line, because the house style writes it that way
|
|
18
|
+
// and a terminator inside a statement ends that statement's comment. It also has
|
|
19
|
+
// to arrive before another header opens: one behind a later opener closes that
|
|
20
|
+
// header, not this one. A plain comment inside the same header does not
|
|
21
|
+
// disqualify a candidate - that comment is part of the text that leaked.
|
|
22
|
+
//
|
|
23
|
+
// The cost of the second bound: a truncated header whose own text holds a
|
|
24
|
+
// line-leading `/**` is not reported, because that opener is not
|
|
25
|
+
// distinguishable from a second header in the same file.
|
|
26
|
+
const ownTerminator = (value, close) => {
|
|
27
|
+
let candidate = value.indexOf(TERMINATOR, close - 1);
|
|
28
|
+
while (candidate !== -1) {
|
|
29
|
+
const lineStart = value.lastIndexOf('\n', candidate - 1) + 1;
|
|
30
|
+
const lineLeading = !value.slice(lineStart, candidate).trim();
|
|
31
|
+
// Another header opens before this candidate, so nothing beyond it can be
|
|
32
|
+
// this header's end.
|
|
33
|
+
if (LATER_HEADER.test(value.slice(close + 2, candidate)))
|
|
34
|
+
return null;
|
|
35
|
+
if (lineLeading)
|
|
36
|
+
return candidate;
|
|
37
|
+
candidate = value.indexOf(TERMINATOR, candidate + 1);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Finds the close marker that ends a Doxygen header early.
|
|
43
|
+
*
|
|
44
|
+
* A header is a SAS block comment, and SAS block comments do not nest: the
|
|
45
|
+
* first close marker ends the comment, so anything after it in the header -
|
|
46
|
+
* `@param` lines, code in a usage example - is compiled as SAS. The marker can
|
|
47
|
+
* belong to a nested comment, come straight after its opener as text, or be
|
|
48
|
+
* bare text.
|
|
49
|
+
*
|
|
50
|
+
* Only the header the file opens with is inspected, which is the header
|
|
51
|
+
* `sasjs compile` reads: a file that opens with code has no header to truncate,
|
|
52
|
+
* and `hasDoxygenHeader` is the rule for that shape.
|
|
53
|
+
*
|
|
54
|
+
* `@sasjs/utils` runs the same three boundaries when it strips a header at
|
|
55
|
+
* compile time (sasjs/utils#288): the file's opening header only, a terminator
|
|
56
|
+
* standing alone on its line, and no later opener in between. The two functions
|
|
57
|
+
* are line-for-line equivalents, so a file this rule passes does not fail the
|
|
58
|
+
* build on this shape and the other way round.
|
|
59
|
+
*/
|
|
60
|
+
const test = (value, config) => {
|
|
61
|
+
const severity = (config === null || config === void 0 ? void 0 : config.severityLevel[name]) || Severity_1.Severity.Warning;
|
|
62
|
+
if (!value)
|
|
63
|
+
return [];
|
|
64
|
+
const start = value.search(/\S/);
|
|
65
|
+
if (start === -1 || !value.startsWith('/**', start))
|
|
66
|
+
return [];
|
|
67
|
+
const close = value.indexOf(CLOSE, start + 2);
|
|
68
|
+
if (close === -1)
|
|
69
|
+
return [];
|
|
70
|
+
const terminator = ownTerminator(value, close);
|
|
71
|
+
// A header that closed at its own terminator was not cut short, and one with
|
|
72
|
+
// no terminator carries no evidence that it was meant to continue.
|
|
73
|
+
if (terminator === null || terminator === close - 1)
|
|
74
|
+
return [];
|
|
75
|
+
const nestedComment = value.indexOf('/*', start + 2);
|
|
76
|
+
const nested = nestedComment !== -1 && nestedComment < close ? nestedComment : null;
|
|
77
|
+
const literalSequence = nested !== null && nested === close - 1;
|
|
78
|
+
const reported = nested !== null && nested !== void 0 ? nested : close;
|
|
79
|
+
const { lineNumber, columnNumber } = (0, getPosition_1.getPosition)(value, reported);
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
message: literalSequence
|
|
83
|
+
? messageForTerminator
|
|
84
|
+
: nested === null
|
|
85
|
+
? messageForText
|
|
86
|
+
: message,
|
|
87
|
+
lineNumber,
|
|
88
|
+
startColumnNumber: columnNumber,
|
|
89
|
+
endColumnNumber: columnNumber + 2,
|
|
90
|
+
severity
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Lint rule that flags a close marker inside the Doxygen header, which SAS
|
|
96
|
+
* reads as the end of the header.
|
|
97
|
+
*/
|
|
98
|
+
exports.noNestedCommentsInHeader = {
|
|
99
|
+
type: LintRuleType_1.LintRuleType.File,
|
|
100
|
+
name,
|
|
101
|
+
description,
|
|
102
|
+
message,
|
|
103
|
+
test
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=noNestedCommentsInHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noNestedCommentsInHeader.js","sourceRoot":"","sources":["../../../src/rules/file/noNestedCommentsInHeader.ts"],"names":[],"mappings":";;;AAEA,2DAAuD;AACvD,mDAA+C;AAC/C,yDAAqD;AAErD,MAAM,IAAI,GAAG,0BAA0B,CAAA;AACvC,MAAM,WAAW,GACf,4UAA4U,CAAA;AAC9U,MAAM,OAAO,GAAG,gDAAgD,CAAA;AAChE,MAAM,oBAAoB,GACxB,sEAAsE,CAAA;AACxE,MAAM,cAAc,GAAG,gDAAgD,CAAA;AAEvE,MAAM,KAAK,GAAG,IAAI,CAAA;AAClB,MAAM,UAAU,GAAG,KAAK,CAAA;AACxB,MAAM,YAAY,GAAG,gBAAgB,CAAA;AAErC,oEAAoE;AACpE,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,wEAAwE;AACxE,yEAAyE;AACzE,EAAE;AACF,0EAA0E;AAC1E,iEAAiE;AACjE,yDAAyD;AACzD,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE;IACrD,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;IAEpD,OAAO,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;QAC5D,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,CAAA;QAE7D,0EAA0E;QAC1E,qBAAqB;QACrB,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CA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,IAAI,CAAA;IACtE,MAAM,eAAe,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,GAAG,CAAC,CAAA;IAE/D,MAAM,QAAQ,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,KAAK,CAAA;IAChC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,IAAA,yBAAW,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAEjE,OAAO;QACL;YACE,OAAO,EAAE,eAAe;gBACtB,CAAC,CAAC,oBAAoB;gBACtB,CAAC,CAAC,MAAM,KAAK,IAAI;oBACf,CAAC,CAAC,cAAc;oBAChB,CAAC,CAAC,OAAO;YACb,UAAU;YACV,iBAAiB,EAAE,YAAY;YAC/B,eAAe,EAAE,YAAY,GAAG,CAAC;YACjC,QAAQ;SACT;KACF,CAAA;AACH,CAAC,CAAA;AAED;;;GAGG;AACU,QAAA,wBAAwB,GAAiB;IACpD,IAAI,EAAE,2BAAY,CAAC,IAAI;IACvB,IAAI;IACJ,WAAW;IACX,OAAO;IACP,IAAI;CACL,CAAA"}
|
package/sasjslint-schema.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"maxLineLength": 80,
|
|
23
23
|
"noEncodedPasswords": true,
|
|
24
24
|
"noGremlins": true,
|
|
25
|
+
"noNestedCommentsInHeader": true,
|
|
25
26
|
"noNestedMacros": true,
|
|
26
27
|
"noSingleAsteriskComments": false,
|
|
27
28
|
"noSpacesInFileNames": true,
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"noTabs": true,
|
|
50
51
|
"indentationMultiple": 4,
|
|
51
52
|
"hasMacroNameInMend": true,
|
|
53
|
+
"noNestedCommentsInHeader": true,
|
|
52
54
|
"noNestedMacros": true,
|
|
53
55
|
"noSingleAsteriskComments": false,
|
|
54
56
|
"noUndeclaredMacros": true,
|
|
@@ -163,6 +165,14 @@
|
|
|
163
165
|
"default": 80,
|
|
164
166
|
"examples": [60, 80, 120]
|
|
165
167
|
},
|
|
168
|
+
"noNestedCommentsInHeader": {
|
|
169
|
+
"$id": "#/properties/noNestedCommentsInHeader",
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"title": "noNestedCommentsInHeader",
|
|
172
|
+
"description": "Disallows a close marker inside the Doxygen header, which SAS reads as the end of the header - the rest of it is then compiled as SAS. Covers a nested block comment, a literal sequence in header text and a bare close marker. Shows a warning for such a header.",
|
|
173
|
+
"default": true,
|
|
174
|
+
"examples": [true, false]
|
|
175
|
+
},
|
|
166
176
|
"noNestedMacros": {
|
|
167
177
|
"$id": "#/properties/noNestedMacros",
|
|
168
178
|
"type": "boolean",
|
|
@@ -359,6 +369,13 @@
|
|
|
359
369
|
"enum": ["error", "warn"],
|
|
360
370
|
"default": "warn"
|
|
361
371
|
},
|
|
372
|
+
"noNestedCommentsInHeader": {
|
|
373
|
+
"$id": "#/properties/severityLevel/noNestedCommentsInHeader",
|
|
374
|
+
"title": "noNestedCommentsInHeader",
|
|
375
|
+
"type": "string",
|
|
376
|
+
"enum": ["error", "warn"],
|
|
377
|
+
"default": "warn"
|
|
378
|
+
},
|
|
362
379
|
"noNestedMacros": {
|
|
363
380
|
"$id": "#/properties/severityLevel/noNestedMacros",
|
|
364
381
|
"title": "noNestedMacros",
|
package/types/LintConfig.js
CHANGED
|
@@ -115,6 +115,9 @@ class LintConfig {
|
|
|
115
115
|
if ((json === null || json === void 0 ? void 0 : json.hasMacroNameInMend) !== false) {
|
|
116
116
|
this.fileLintRules.push(file_1.hasMacroNameInMend);
|
|
117
117
|
}
|
|
118
|
+
if ((json === null || json === void 0 ? void 0 : json.noNestedCommentsInHeader) !== false) {
|
|
119
|
+
this.fileLintRules.push(file_1.noNestedCommentsInHeader);
|
|
120
|
+
}
|
|
118
121
|
if ((json === null || json === void 0 ? void 0 : json.noNestedMacros) !== false) {
|
|
119
122
|
this.fileLintRules.push(file_1.noNestedMacros);
|
|
120
123
|
}
|
package/types/LintConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LintConfig.js","sourceRoot":"","sources":["../../src/types/LintConfig.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"LintConfig.js","sourceRoot":"","sources":["../../src/types/LintConfig.ts"],"names":[],"mappings":";;;AAAA,wCAasB;AACtB,wCAOsB;AACtB,wCAAuE;AACvE,+CAA2C;AAE3C,oCAAiE;AACjE,8DAA0D;AAC1D,yCAAqC;AAErC;;;;;;GAMG;AACH,MAAa,UAAU;IAmBrB,YAAY,IAAU;QAhBb,eAAU,GAAa,EAAE,CAAA;QACzB,oBAAe,GAAa,EAAE,CAAA;QAC9B,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAW,EAAE,CAAA;QAC1B,wBAAmB,GAAW,EAAE,CAAA;QAChC,sBAAiB,GAAW,EAAE,CAAA;QAC9B,wBAAmB,GAAW,CAAC,CAAA;QAC/B,gBAAW,GAAgB,yBAAW,CAAC,EAAE,CAAA;QACzC,kBAAa,GAAW,IAAA,wBAAgB,GAAE,CAAA;QAC1C,kBAAa,GAAgC,EAAE,CAAA;QAC/C,yBAAoB,GAAa,EAAE,CAAA;QACnC,oBAAe,GAAa,EAAE,CAAA;QAC9B,kBAAa,GAAa,EAAE,CAAA;QAGnC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;QAExB,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE,CAAC;YACrB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACnC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;oBACpC,IAAI,OAAO,IAAI,KAAK,QAAQ;wBAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CA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BAAQ,IAAI,CAAC,MAAM,CAAE,CAAA;QAEjC,wEAAwE;QACxE,0EAA0E;QAC1E,4EAA4E;QAC5E,iEAAiE;QACjE,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,CAAC,aAAa,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAA;QAChD,CAAC;QAED,OAAO,IAAI,UAAU,CAAC,IAAA,iCAAe,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;IACtD,CAAC;CACF;AA1PD,gCA0PC"}
|
package/utils/getLintConfig.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const DefaultLintConfiguration: {
|
|
|
27
27
|
maxLineLength: number;
|
|
28
28
|
noEncodedPasswords: boolean;
|
|
29
29
|
noGremlins: boolean;
|
|
30
|
+
noNestedCommentsInHeader: boolean;
|
|
30
31
|
noNestedMacros: boolean;
|
|
31
32
|
noSingleAsteriskComments: boolean;
|
|
32
33
|
noSpacesInFileNames: boolean;
|
package/utils/getLintConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLintConfig.js","sourceRoot":"","sources":["../../src/utils/getLintConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getLintConfig.js","sourceRoot":"","sources":["../../src/utils/getLintConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwDA,sCASC;AAjED,gDAAuB;AACvB,4CAAmB;AACnB,oDAAgD;AAChD,4CAA4C;AAC5C,qDAAiD;AACjD,sDAAkD;AAClD,iEAA6D;AAEtD,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,wIAAwI,CAAA;AAD7H,QAAA,gBAAgB,oBAC6G;AAE1I;;;;;;;GAOG;AACU,QAAA,wBAAwB,GAAG;IACtC,eAAe,EAAE,EAAE;IACnB,aAAa,EAAE,IAAA,wBAAgB,GAAE;IACjC,gBAAgB,EAAE,IAAI;IACt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|
+
/**
|
|
2
|
+
* Reports the one-based line and column of a character index.
|
|
3
|
+
*
|
|
4
|
+
* The lines come from `splitLines`, so a file with either line ending reads
|
|
5
|
+
* correctly; a reader that splits on `\n` alone reports the wrong position for
|
|
6
|
+
* a CRLF file.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} text - the text the index belongs to.
|
|
9
|
+
* @param {number} index - the index to locate.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getPosition: (text: string, index: number) => {
|
|
12
|
+
lineNumber: number;
|
|
13
|
+
columnNumber: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPosition = void 0;
|
|
4
|
+
const splitLines_1 = require("./splitLines");
|
|
5
|
+
/**
|
|
6
|
+
* Reports the one-based line and column of a character index.
|
|
7
|
+
*
|
|
8
|
+
* The lines come from `splitLines`, so a file with either line ending reads
|
|
9
|
+
* correctly; a reader that splits on `\n` alone reports the wrong position for
|
|
10
|
+
* a CRLF file.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} text - the text the index belongs to.
|
|
13
|
+
* @param {number} index - the index to locate.
|
|
14
|
+
*/
|
|
15
|
+
const getPosition = (text, index) => {
|
|
16
|
+
if (index <= 0)
|
|
17
|
+
return { lineNumber: 1, columnNumber: 1 };
|
|
18
|
+
const lines = (0, splitLines_1.splitLines)(text.slice(0, index));
|
|
19
|
+
return {
|
|
20
|
+
lineNumber: lines.length,
|
|
21
|
+
columnNumber: lines[lines.length - 1].length + 1
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.getPosition = getPosition;
|
|
25
|
+
//# sourceMappingURL=getPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPosition.js","sourceRoot":"","sources":["../../src/utils/getPosition.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAEzC;;;;;;;;;GASG;AACI,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;IACzD,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAA;IAEzD,MAAM,KAAK,GAAG,IAAA,uBAAU,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;IAE9C,OAAO;QACL,UAAU,EAAE,KAAK,CAAC,MAAM;QACxB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;KACjD,CAAA;AACH,CAAC,CAAA;AATY,QAAA,WAAW,eASvB"}
|
package/utils/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './gremlinCharacters';
|
|
|
5
5
|
export * from './isIgnored';
|
|
6
6
|
export * from './listSasFiles';
|
|
7
7
|
export * from './splitText';
|
|
8
|
+
export * from './getPosition';
|
|
8
9
|
export * from './splitLines';
|
|
9
10
|
export * from './getIndicesOf';
|
|
10
11
|
export * from './getHeaderLinesCount';
|
package/utils/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./gremlinCharacters"), exports);
|
|
|
21
21
|
__exportStar(require("./isIgnored"), exports);
|
|
22
22
|
__exportStar(require("./listSasFiles"), exports);
|
|
23
23
|
__exportStar(require("./splitText"), exports);
|
|
24
|
+
__exportStar(require("./getPosition"), exports);
|
|
24
25
|
__exportStar(require("./splitLines"), exports);
|
|
25
26
|
__exportStar(require("./getIndicesOf"), exports);
|
|
26
27
|
__exportStar(require("./getHeaderLinesCount"), exports);
|
package/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,kDAA+B;AAC/B,mDAAgC;AAChC,sDAAmC;AACnC,8CAA2B;AAC3B,iDAA8B;AAC9B,8CAA2B;AAC3B,+CAA4B;AAC5B,iDAA8B;AAC9B,wDAAqC;AACrC,0DAAuC;AACvC,yDAAsC;AACtC,iDAA8B;AAC9B,oDAAiC;AACjC,kDAA+B;AAC/B,sDAAmC;AACnC,oDAAiC;AACjC,8CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,kDAA+B;AAC/B,mDAAgC;AAChC,sDAAmC;AACnC,8CAA2B;AAC3B,iDAA8B;AAC9B,8CAA2B;AAC3B,gDAA6B;AAC7B,+CAA4B;AAC5B,iDAA8B;AAC9B,wDAAqC;AACrC,0DAAuC;AACvC,yDAAsC;AACtC,iDAA8B;AAC9B,oDAAiC;AACjC,kDAA+B;AAC/B,sDAAmC;AACnC,oDAAiC;AACjC,8CAA2B"}
|