@sasjs/lint 1.15.0 → 2.0.1

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 CHANGED
@@ -9,48 +9,46 @@
9
9
 
10
10
  Our goal is to help SAS developers everywhere spend less time on code reviews, bug fixing and arguing about standards - and more time delivering extraordinary business value.
11
11
 
12
- ## Linting
12
+ # Linting
13
+
13
14
  @sasjs/lint is used by the following products:
14
15
 
15
- * [@sasjs/vscode-extension](https://github.com/sasjs/vscode-extension) - just download SASjs in the VSCode marketplace, and select view/problems in the menu bar.
16
- * [@sasjs/cli](https://cli.sasjs.io/lint) - run `sasjs lint` to get a list of all files with their problems, along with line and column indexes.
16
+ - [@sasjs/vscode-extension](https://github.com/sasjs/vscode-extension) - just download SASjs in the VSCode marketplace, and select view/problems in the menu bar.
17
+ - [@sasjs/cli](https://cli.sasjs.io/lint) - run `sasjs lint` to get a list of all files with their problems, along with line and column indexes.
17
18
 
18
19
  Configuration is via a `.sasjslint` file with the following structure (these are also the defaults if no .sasjslint file is found):
19
20
 
20
21
  ```json
21
22
  {
22
- "noEncodedPasswords": true,
23
- "hasDoxygenHeader": true,
24
- "hasMacroNameInMend": true,
25
- "hasMacroParentheses": true,
26
- "ignoreList": [
27
- "sajsbuild/",
28
- "sasjsresults/"
29
- ],
30
- "indentationMultiple": 2,
31
- "lowerCaseFileNames": true,
32
- "maxLineLength": 80,
33
- "noNestedMacros": true,
34
- "noSpacesInFileNames": true,
35
- "noTabIndentation": true,
36
- "noTrailingSpaces": true,
37
- "defaultHeader": "/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding} <h4> SAS Macros </h4>{lineEnding}**/"
23
+ "noEncodedPasswords": true,
24
+ "hasDoxygenHeader": true,
25
+ "hasMacroNameInMend": true,
26
+ "hasMacroParentheses": true,
27
+ "ignoreList": ["sajsbuild/", "sasjsresults/"],
28
+ "indentationMultiple": 2,
29
+ "lowerCaseFileNames": true,
30
+ "maxLineLength": 80,
31
+ "noNestedMacros": true,
32
+ "noSpacesInFileNames": true,
33
+ "noTabs": true,
34
+ "noTrailingSpaces": true,
35
+ "defaultHeader": "/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding} <h4> SAS Macros </h4>{lineEnding}**/"
38
36
  }
39
37
  ```
40
38
 
41
- ### SAS Lint Settings
39
+ ## SAS Lint Settings
42
40
 
43
41
  Each setting can have three states:
44
42
 
45
- * OFF - usually by setting the value to `false` or 0. In this case, the rule won't be executed.
46
- * WARN - a warning is written to the log, but the return code will be 0
47
- * ERROR - an error is written to the log, and the return code is 1
43
+ - OFF - usually by setting the value to `false` or 0. In this case, the rule won't be executed.
44
+ - WARN - a warning is written to the log, but the return code will be 0
45
+ - ERROR - an error is written to the log, and the return code is 1
48
46
 
49
- For more details, and the default state, see the description of each rule below. It is also possible to change whether a rule returns ERROR or WARN using the `severityLevels` object.
47
+ For more details, and the default state, see the description of each rule below. It is also possible to change whether a rule returns ERROR or WARN using the `severityLevels` object.
50
48
 
51
- #### defaultHeader
49
+ ### defaultHeader
52
50
 
53
- This isn't actually a rule - but rather a formatting setting, which applies to SAS program that do NOT begin with `/**`. It can be triggered by running `sasjs lint fix` in the SASjs CLI, or by hitting "save" when using the SASjs VS Code extension (with "formatOnSave" in place)
51
+ This isn't actually a rule - but rather a formatting setting, which applies to SAS program that do NOT begin with `/**`. It can be triggered by running `sasjs lint fix` in the SASjs CLI, or by hitting "save" when using the SASjs VS Code extension (with "formatOnSave" in place)
54
52
 
55
53
  The default header is as follows:
56
54
 
@@ -61,6 +59,7 @@ The default header is as follows:
61
59
  <h4> SAS Macros </h4>
62
60
  **/
63
61
  ```
62
+
64
63
  If creating a new value, use `{lineEnding}` instead of `\n`, eg as follows:
65
64
 
66
65
  ```json
@@ -69,88 +68,100 @@ If creating a new value, use `{lineEnding}` instead of `\n`, eg as follows:
69
68
  }
70
69
  ```
71
70
 
72
- #### noEncodedPasswords
71
+ ### noEncodedPasswords
72
+
73
+ This rule 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.
73
74
 
74
- This rule 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.
75
+ - Default: true
76
+ - Severity: ERROR
75
77
 
76
- * Default: true
77
- * Severity: ERROR
78
+ ### hasDoxygenHeader
78
79
 
79
- #### hasDoxygenHeader
80
- 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.
80
+ 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.
81
81
 
82
- * Default: true
83
- * Severity: WARNING
82
+ - Default: true
83
+ - Severity: WARNING
84
84
 
85
- #### hasMacroNameInMend
86
- 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.
85
+ ### hasMacroNameInMend
87
86
 
88
- * Default: true
89
- * Severity: WARNING
87
+ 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.
90
88
 
91
- #### hasMacroParentheses
92
- 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.
89
+ - Default: true
90
+ - Severity: WARNING
93
91
 
94
- * Default: true
95
- * Severity: WARNING
92
+ ### hasMacroParentheses
96
93
 
97
- #### ignoreList
98
- There may be specific files (or folders) that are not good candidates for linting. Simply list them in this array and they will be ignored. In addition, any files in the project `.gitignore` file will also be ignored.
94
+ 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.
95
+
96
+ - Default: true
97
+ - Severity: WARNING
98
+
99
+ ### ignoreList
100
+
101
+ There may be specific files (or folders) that are not good candidates for linting. Simply list them in this array and they will be ignored. In addition, any files in the project `.gitignore` file will also be ignored.
102
+
103
+ ### indentationMultiple
99
104
 
100
- #### indentationMultiple
101
105
  This will check each line to ensure that the count of leading spaces can be divided cleanly by this multiple.
102
106
 
103
- * Default: 2
104
- * Severity: WARNING
107
+ - Default: 2
108
+ - Severity: WARNING
109
+
110
+ ### lowerCaseFileNames
105
111
 
106
- #### lowerCaseFileNames
107
- 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.
112
+ 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.
108
113
 
109
- * Default: true
110
- * Severity: WARNING
114
+ - Default: true
115
+ - Severity: WARNING
111
116
 
112
- #### maxLineLength
113
- 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)
117
+ ### maxLineLength
118
+
119
+ 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)
114
120
 
115
121
  In batch mode, long SAS code lines may also be truncated, causing hard-to-detect errors.
116
122
 
117
- We strongly recommend a line length limit, and set the bar at 80. To turn this feature off, set the value to 0.
123
+ We strongly recommend a line length limit, and set the bar at 80. To turn this feature off, set the value to 0.
124
+
125
+ - Default: 80
126
+ - Severity: WARNING
127
+
128
+ ### noNestedMacros
118
129
 
119
- * Default: 80
120
- * Severity: WARNING
130
+ 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.
121
131
 
122
- #### noNestedMacros
123
- 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.
132
+ - Default: true
133
+ - Severity: WARNING
124
134
 
125
- * Default: true
126
- * Severity: WARNING
135
+ ### noSpacesInFileNames
127
136
 
128
- #### noSpacesInFileNames
129
137
  The 'beef' we have with spaces in filenames is twofold:
130
138
 
131
- * Loss of the in-built ability to 'click' a filepath and have the file open automatically
132
- * The need to quote such filepaths in order to use them in CLI commands
139
+ - Loss of the in-built ability to 'click' a filepath and have the file open automatically
140
+ - The need to quote such filepaths in order to use them in CLI commands
141
+
142
+ 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.
143
+
144
+ - Default: true
145
+ - Severity: WARNING
133
146
 
134
- 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.
147
+ ### noTabs
135
148
 
136
- * Default: true
137
- * Severity: WARNING
149
+ Whilst there are some arguments for using tabs (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).
138
150
 
139
- #### noTabIndentation
140
- 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).
151
+ - Alias: noTabIndentation
152
+ - Default: true
153
+ - Severity: WARNING
141
154
 
142
- * Default: true
143
- * Severity: WARNING
155
+ ### noTrailingSpaces
144
156
 
145
- #### noTrailingSpaces
146
- This will highlight lines with trailing spaces. Trailing spaces serve no useful purpose in a SAS program.
157
+ This will highlight lines with trailing spaces. Trailing spaces serve no useful purpose in a SAS program.
147
158
 
148
- * Default: true
149
- * severity: WARNING
159
+ - Default: true
160
+ - severity: WARNING
150
161
 
151
- ### severityLevel
162
+ ## severityLevel
152
163
 
153
- This setting allows the default severity to be adjusted. This is helpful when running the lint in a pipeline or git hook. Simply list the rules you would like to adjust along with the desired setting ("warn" or "error"), eg as follows:
164
+ This setting allows the default severity to be adjusted. This is helpful when running the lint in a pipeline or git hook. Simply list the rules you would like to adjust along with the desired setting ("warn" or "error"), eg as follows:
154
165
 
155
166
  ```json
156
167
  {
@@ -165,46 +176,46 @@ This setting allows the default severity to be adjusted. This is helpful when r
165
176
  }
166
177
  ```
167
178
 
168
- * "warn" - show warning in the log (doesn’t affect exit code)
169
- * "error" - show error in the log (exit code is 1 when triggered)
179
+ - "warn" - show warning in the log (doesn’t affect exit code)
180
+ - "error" - show error in the log (exit code is 1 when triggered)
170
181
 
171
- ### Upcoming Linting Rules:
182
+ ## Upcoming Linting Rules:
172
183
 
173
- * `noTabs` -> does what it says on the tin
174
- * `noGremlins` -> identifies all invisible characters, other than spaces / tabs / line endings. If you really need that bell character, use a hex literal!
175
- * `lineEndings` -> set a standard line ending, such as LF or CRLF
184
+ - `noGremlins` -> identifies all invisible characters, other than spaces / tabs / line endings. If you really need that bell character, use a hex literal!
185
+ - `lineEndings` -> set a standard line ending, such as LF or CRLF
176
186
 
177
- ## SAS Formatter
187
+ # SAS Formatter
178
188
 
179
189
  A formatter will automatically apply rules when you hit SAVE, which can save a LOT of time.
180
190
 
181
191
  We've already implemented the following rules:
182
192
 
183
- * Add the macro name to the %mend statement
184
- * Add a doxygen header template if none exists
185
- * Remove trailing spaces
193
+ - Add the macro name to the %mend statement
194
+ - Add a doxygen header template if none exists
195
+ - Remove trailing spaces
186
196
 
187
197
  We're looking to implement the following rules:
188
198
 
189
- * Change tabs to spaces
190
- * zap gremlins
191
- * fix line endings
199
+ - Change tabs to spaces
200
+ - zap gremlins
201
+ - fix line endings
192
202
 
193
203
  We are also investigating some harder stuff, such as automatic indentation and code layout
194
204
 
195
- ## Sponsorship & Contributions
205
+ # Sponsorship & Contributions
196
206
 
197
- SASjs is an open source framework! Contributions are welcomed. If you would like to see a feature, because it would be useful in your project, but you don't have the requisite (Typescript) experience - then how about you engage us on a short project and we build it for you?
207
+ SASjs is an open source framework! Contributions are welcomed. If you would like to see a feature, because it would be useful in your project, but you don't have the requisite (Typescript) experience - then how about you engage us on a short project and we build it for you?
198
208
 
199
209
  Contact [Allan Bowe](https://www.linkedin.com/in/allanbowe/) for further details.
200
210
 
211
+ # Contributors ✨
201
212
 
202
-
203
-
204
- ## Contributors ✨
205
213
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
214
+
206
215
  [![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
216
+
207
217
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
218
+
208
219
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
209
220
 
210
221
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
package/package.json CHANGED
@@ -51,5 +51,5 @@
51
51
  "@sasjs/utils": "^2.19.0",
52
52
  "ignore": "^5.2.0"
53
53
  },
54
- "version": "1.15.0"
54
+ "version": "2.0.1"
55
55
  }
@@ -1,5 +1,5 @@
1
1
  export { indentationMultiple } from './indentationMultiple';
2
2
  export { maxLineLength } from './maxLineLength';
3
3
  export { noEncodedPasswords } from './noEncodedPasswords';
4
- export { noTabIndentation } from './noTabIndentation';
4
+ export { noTabs } from './noTabs';
5
5
  export { noTrailingSpaces } from './noTrailingSpaces';
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.noTrailingSpaces = exports.noTabIndentation = exports.noEncodedPasswords = exports.maxLineLength = exports.indentationMultiple = void 0;
3
+ exports.noTrailingSpaces = exports.noTabs = exports.noEncodedPasswords = exports.maxLineLength = exports.indentationMultiple = void 0;
4
4
  var indentationMultiple_1 = require("./indentationMultiple");
5
5
  Object.defineProperty(exports, "indentationMultiple", { enumerable: true, get: function () { return indentationMultiple_1.indentationMultiple; } });
6
6
  var maxLineLength_1 = require("./maxLineLength");
7
7
  Object.defineProperty(exports, "maxLineLength", { enumerable: true, get: function () { return maxLineLength_1.maxLineLength; } });
8
8
  var noEncodedPasswords_1 = require("./noEncodedPasswords");
9
9
  Object.defineProperty(exports, "noEncodedPasswords", { enumerable: true, get: function () { return noEncodedPasswords_1.noEncodedPasswords; } });
10
- var noTabIndentation_1 = require("./noTabIndentation");
11
- Object.defineProperty(exports, "noTabIndentation", { enumerable: true, get: function () { return noTabIndentation_1.noTabIndentation; } });
10
+ var noTabs_1 = require("./noTabs");
11
+ Object.defineProperty(exports, "noTabs", { enumerable: true, get: function () { return noTabs_1.noTabs; } });
12
12
  var noTrailingSpaces_1 = require("./noTrailingSpaces");
13
13
  Object.defineProperty(exports, "noTrailingSpaces", { enumerable: true, get: function () { return noTrailingSpaces_1.noTrailingSpaces; } });
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/line/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/line/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA"}
@@ -2,4 +2,4 @@ import { LineLintRule } from '../../types/LintRule';
2
2
  /**
3
3
  * Lint rule that checks if a given line of text is indented with a tab.
4
4
  */
5
- export declare const noTabIndentation: LineLintRule;
5
+ export declare const noTabs: LineLintRule;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.noTabs = void 0;
4
+ var LintRuleType_1 = require("../../types/LintRuleType");
5
+ var Severity_1 = require("../../types/Severity");
6
+ var utils_1 = require("../../utils");
7
+ var name = 'noTabs';
8
+ var alias = 'noTabIndentation';
9
+ var description = 'Disallow indenting with tabs.';
10
+ var message = 'Line contains a tab character (09x)';
11
+ var test = function (value, lineNumber, config) {
12
+ var severity = (config === null || config === void 0 ? void 0 : config.severityLevel[name]) ||
13
+ (config === null || config === void 0 ? void 0 : config.severityLevel[alias]) ||
14
+ Severity_1.Severity.Warning;
15
+ var indices = utils_1.getIndicesOf('\t', value);
16
+ return indices.map(function (index) { return ({
17
+ message: message,
18
+ lineNumber: lineNumber,
19
+ startColumnNumber: index + 1,
20
+ endColumnNumber: index + 2,
21
+ severity: severity
22
+ }); });
23
+ };
24
+ /**
25
+ * Lint rule that checks if a given line of text is indented with a tab.
26
+ */
27
+ exports.noTabs = {
28
+ type: LintRuleType_1.LintRuleType.Line,
29
+ name: name,
30
+ description: description,
31
+ message: message,
32
+ test: test
33
+ };
34
+ //# sourceMappingURL=noTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noTabs.js","sourceRoot":"","sources":["../../../src/rules/line/noTabs.ts"],"names":[],"mappings":";;;AAEA,yDAAuD;AACvD,iDAA+C;AAC/C,qCAA0C;AAE1C,IAAM,IAAI,GAAG,QAAQ,CAAA;AACrB,IAAM,KAAK,GAAG,kBAAkB,CAAA;AAChC,IAAM,WAAW,GAAG,+BAA+B,CAAA;AACnD,IAAM,OAAO,GAAG,qCAAqC,CAAA;AAErD,IAAM,IAAI,GAAG,UAAC,KAAa,EAAE,UAAkB,EAAE,MAAmB;IAClE,IAAM,QAAQ,GACZ,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,IAAI,CAAC;SAC3B,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,KAAK,CAAC,CAAA;QAC5B,mBAAQ,CAAC,OAAO,CAAA;IAElB,IAAM,OAAO,GAAG,oBAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAEzC,OAAO,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC;QAC7B,OAAO,SAAA;QACP,UAAU,YAAA;QACV,iBAAiB,EAAE,KAAK,GAAG,CAAC;QAC5B,eAAe,EAAE,KAAK,GAAG,CAAC;QAC1B,QAAQ,UAAA;KACT,CAAC,EAN4B,CAM5B,CAAC,CAAA;AACL,CAAC,CAAA;AAED;;GAEG;AACU,QAAA,MAAM,GAAiB;IAClC,IAAI,EAAE,2BAAY,CAAC,IAAI;IACvB,IAAI,MAAA;IACJ,WAAW,aAAA;IACX,OAAO,SAAA;IACP,IAAI,MAAA;CACL,CAAA"}
@@ -15,7 +15,7 @@
15
15
  "maxLineLength": 80,
16
16
  "noNestedMacros": true,
17
17
  "noSpacesInFileNames": true,
18
- "noTabIndentation": true,
18
+ "noTabs": true,
19
19
  "noTrailingSpaces": true,
20
20
  "lineEndings": "lf",
21
21
  "strictMacroDefinition": true,
@@ -29,7 +29,7 @@
29
29
  "noSpacesInFileNames": true,
30
30
  "lowerCaseFileNames": true,
31
31
  "maxLineLength": 80,
32
- "noTabIndentation": true,
32
+ "noTabs": true,
33
33
  "indentationMultiple": 4,
34
34
  "hasMacroNameInMend": true,
35
35
  "noNestedMacros": true,
@@ -120,11 +120,11 @@
120
120
  "default": true,
121
121
  "examples": [true, false]
122
122
  },
123
- "noTabIndentation": {
124
- "$id": "#/properties/noTabIndentation",
123
+ "noTabs": {
124
+ "$id": "#/properties/noTabs",
125
125
  "type": "boolean",
126
- "title": "noTabIndentation",
127
- "description": "Enforces no indentation using tabs. Shows a warning when a line starts with a tab.",
126
+ "title": "noTabs",
127
+ "description": "Enforces no indentation using tabs. Shows a warning when a line contains a tab.",
128
128
  "default": true,
129
129
  "examples": [true, false]
130
130
  },
@@ -166,15 +166,18 @@
166
166
  "title": "severityLevel",
167
167
  "description": "An object which specifies the severity level of each rule.",
168
168
  "default": {},
169
- "examples": [{
170
- "hasDoxygenHeader": "warn",
171
- "maxLineLength": "warn",
172
- "noTrailingSpaces": "error"
173
- }, {
174
- "hasDoxygenHeader": "warn",
175
- "maxLineLength": "error",
176
- "noTrailingSpaces": "error"
177
- }],
169
+ "examples": [
170
+ {
171
+ "hasDoxygenHeader": "warn",
172
+ "maxLineLength": "warn",
173
+ "noTrailingSpaces": "error"
174
+ },
175
+ {
176
+ "hasDoxygenHeader": "warn",
177
+ "maxLineLength": "error",
178
+ "noTrailingSpaces": "error"
179
+ }
180
+ ],
178
181
  "properties": {
179
182
  "noEncodedPasswords": {
180
183
  "$id": "#/properties/severityLevel/noEncodedPasswords",
@@ -188,7 +191,8 @@
188
191
  "title": "hasDoxygenHeader",
189
192
  "type": "string",
190
193
  "enum": ["error", "warn"],
191
- "default": "warn" },
194
+ "default": "warn"
195
+ },
192
196
  "hasMacroNameInMend": {
193
197
  "$id": "#/properties/severityLevel/hasMacroNameInMend",
194
198
  "title": "hasMacroNameInMend",
@@ -238,9 +242,9 @@
238
242
  "enum": ["error", "warn"],
239
243
  "default": "warn"
240
244
  },
241
- "noTabIndentation": {
242
- "$id": "#/properties/severityLevel/noTabIndentation",
243
- "title": "noTabIndentation",
245
+ "noTabs": {
246
+ "$id": "#/properties/severityLevel/noTabs",
247
+ "title": "noTabs",
244
248
  "type": "string",
245
249
  "enum": ["error", "warn"],
246
250
  "default": "warn"
@@ -267,7 +271,6 @@
267
271
  "default": "warn"
268
272
  }
269
273
  }
270
-
271
274
  }
272
275
  }
273
276
  }
@@ -73,8 +73,8 @@ var LintConfig = /** @class */ (function () {
73
73
  if (json === null || json === void 0 ? void 0 : json.noEncodedPasswords) {
74
74
  this.lineLintRules.push(line_1.noEncodedPasswords);
75
75
  }
76
- if (json === null || json === void 0 ? void 0 : json.noTabIndentation) {
77
- this.lineLintRules.push(line_1.noTabIndentation);
76
+ if ((json === null || json === void 0 ? void 0 : json.noTabs) || (json === null || json === void 0 ? void 0 : json.noTabIndentation)) {
77
+ this.lineLintRules.push(line_1.noTabs);
78
78
  }
79
79
  if (json === null || json === void 0 ? void 0 : json.maxLineLength) {
80
80
  this.maxLineLength = json.maxLineLength;
@@ -1 +1 @@
1
- {"version":3,"file":"LintConfig.js","sourceRoot":"","sources":["../../src/types/LintConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAOsB;AACtB,sCAMsB;AACtB,sCAAuE;AACvE,6CAA2C;AAE3C,kCAA2C;AAC3C,uCAAqC;AAErC;;;;;;GAMG;AACH;IAWE,oBAAY,IAAU;;QAAtB,iBAwFC;QAlGQ,eAAU,GAAa,EAAE,CAAA;QACzB,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAmB,EAAE,CAAA;QAClC,kBAAa,GAAW,EAAE,CAAA;QAC1B,wBAAmB,GAAW,CAAC,CAAA;QAC/B,gBAAW,GAAgB,yBAAW,CAAC,EAAE,CAAA;QACzC,kBAAa,GAAW,wBAAgB,EAAE,CAAA;QAC1C,kBAAa,GAAgC,EAAE,CAAA;QAGtD,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE;YACpB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAClC,IAAI,CAAC,UAAU,CAAC,OAAO,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AAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,EAAE;YAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,0BAAmB,CAAC,CAAA;SAC7C;QAED,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,qBAAqB,EAAE;YAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,4BAAqB,CAAC,CAAA;SAC/C;QAED,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,EAAE;;gBACvB,KAA+B,IAAA,KAAA,SAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA,gBAAA,4BAAE;oBAAxD,IAAA,KAAA,mBAAgB,EAAf,IAAI,QAAA,EAAE,QAAQ,QAAA;oBACxB,IAAI,QAAQ,KAAK,MAAM;wBAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,mBAAQ,CAAC,OAAO,CAAA;oBACpE,IAAI,QAAQ,KAAK,OAAO;wBAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,mBAAQ,CAAC,KAAK,CAAA;iBACpE;;;;;;;;;SACF;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AApGD,IAoGC;AApGY,gCAAU"}
@@ -0,0 +1 @@
1
+ export declare const getIndicesOf: (searchStr: string, str: string, caseSensitive?: boolean) => number[];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIndicesOf = void 0;
4
+ var getIndicesOf = function (searchStr, str, caseSensitive) {
5
+ if (caseSensitive === void 0) { caseSensitive = true; }
6
+ var searchStrLen = searchStr.length;
7
+ if (searchStrLen === 0) {
8
+ return [];
9
+ }
10
+ var startIndex = 0, index, indices = [];
11
+ if (!caseSensitive) {
12
+ str = str.toLowerCase();
13
+ searchStr = searchStr.toLowerCase();
14
+ }
15
+ while ((index = str.indexOf(searchStr, startIndex)) > -1) {
16
+ indices.push(index);
17
+ startIndex = index + searchStrLen;
18
+ }
19
+ return indices;
20
+ };
21
+ exports.getIndicesOf = getIndicesOf;
22
+ //# sourceMappingURL=getIndicesOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getIndicesOf.js","sourceRoot":"","sources":["../../src/utils/getIndicesOf.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAY,GAAG,UAC1B,SAAiB,EACjB,GAAW,EACX,aAA6B;IAA7B,8BAAA,EAAA,oBAA6B;IAE7B,IAAM,YAAY,GAAG,SAAS,CAAC,MAAM,CAAA;IACrC,IAAI,YAAY,KAAK,CAAC,EAAE;QACtB,OAAO,EAAE,CAAA;KACV;IAED,IAAI,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,OAAO,GAAG,EAAE,CAAA;IAEd,IAAI,CAAC,aAAa,EAAE;QAClB,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAA;QACvB,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAA;KACpC;IAED,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;QACxD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACnB,UAAU,GAAG,KAAK,GAAG,YAAY,CAAA;KAClC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAzBY,QAAA,YAAY,gBAyBxB"}
package/utils/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './getProjectRoot';
4
4
  export * from './isIgnored';
5
5
  export * from './listSasFiles';
6
6
  export * from './splitText';
7
+ export * from './getIndicesOf';
package/utils/index.js CHANGED
@@ -16,4 +16,5 @@ __exportStar(require("./getProjectRoot"), exports);
16
16
  __exportStar(require("./isIgnored"), exports);
17
17
  __exportStar(require("./listSasFiles"), exports);
18
18
  __exportStar(require("./splitText"), exports);
19
+ __exportStar(require("./getIndicesOf"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -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,8CAA2B;AAC3B,iDAA8B;AAC9B,8CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8B;AAC9B,kDAA+B;AAC/B,mDAAgC;AAChC,8CAA2B;AAC3B,iDAA8B;AAC9B,8CAA2B;AAC3B,iDAA8B"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.noTabIndentation = void 0;
4
- var LintRuleType_1 = require("../../types/LintRuleType");
5
- var Severity_1 = require("../../types/Severity");
6
- var name = 'noTabs';
7
- var description = 'Disallow indenting with tabs.';
8
- var message = 'Line is indented with a tab';
9
- var test = function (value, lineNumber, config) {
10
- var severity = (config === null || config === void 0 ? void 0 : config.severityLevel[name]) || Severity_1.Severity.Warning;
11
- if (!value.startsWith('\t'))
12
- return [];
13
- return [
14
- {
15
- message: message,
16
- lineNumber: lineNumber,
17
- startColumnNumber: 1,
18
- endColumnNumber: 1,
19
- severity: severity
20
- }
21
- ];
22
- };
23
- /**
24
- * Lint rule that checks if a given line of text is indented with a tab.
25
- */
26
- exports.noTabIndentation = {
27
- type: LintRuleType_1.LintRuleType.Line,
28
- name: name,
29
- description: description,
30
- message: message,
31
- test: test
32
- };
33
- //# sourceMappingURL=noTabIndentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"noTabIndentation.js","sourceRoot":"","sources":["../../../src/rules/line/noTabIndentation.ts"],"names":[],"mappings":";;;AAEA,yDAAuD;AACvD,iDAA+C;AAE/C,IAAM,IAAI,GAAG,QAAQ,CAAA;AACrB,IAAM,WAAW,GAAG,+BAA+B,CAAA;AACnD,IAAM,OAAO,GAAG,6BAA6B,CAAA;AAE7C,IAAM,IAAI,GAAG,UAAC,KAAa,EAAE,UAAkB,EAAE,MAAmB;IAClE,IAAM,QAAQ,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,IAAI,CAAC,KAAI,mBAAQ,CAAC,OAAO,CAAA;IAChE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAA;IACtC,OAAO;QACL;YACE,OAAO,SAAA;YACP,UAAU,YAAA;YACV,iBAAiB,EAAE,CAAC;YACpB,eAAe,EAAE,CAAC;YAClB,QAAQ,UAAA;SACT;KACF,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACU,QAAA,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,2BAAY,CAAC,IAAI;IACvB,IAAI,MAAA;IACJ,WAAW,aAAA;IACX,OAAO,SAAA;IACP,IAAI,MAAA;CACL,CAAA"}