@atlisp/lint 0.1.9 → 0.1.10
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/atlisp-lint.default.json +2 -2
- package/dist/config.js +2 -2
- package/dist/index.js +8 -3
- package/dist/presets.js +3 -3
- package/package.json +1 -1
package/atlisp-lint.default.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"encoding": "error",
|
|
10
10
|
"cl_syntax": "warn",
|
|
11
11
|
"quit_exit": "error",
|
|
12
|
-
"command_shell": "
|
|
12
|
+
"command_shell": "warn",
|
|
13
13
|
"startapp": "warn",
|
|
14
14
|
"vl_registry_write": "warn",
|
|
15
15
|
"vlax_without_loading": "warn",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"dangerous_calls": {
|
|
96
96
|
"quit": "error",
|
|
97
97
|
"exit": "error",
|
|
98
|
-
"command_shell": "
|
|
98
|
+
"command_shell": "warn",
|
|
99
99
|
"startapp": "warn",
|
|
100
100
|
"vl_registry_write": "warn"
|
|
101
101
|
},
|
package/dist/config.js
CHANGED
|
@@ -51,7 +51,7 @@ const DEFAULT_CONFIG = {
|
|
|
51
51
|
encoding: 'error',
|
|
52
52
|
cl_syntax: 'warn',
|
|
53
53
|
quit_exit: 'error',
|
|
54
|
-
command_shell: '
|
|
54
|
+
command_shell: 'warn',
|
|
55
55
|
startapp: 'warn',
|
|
56
56
|
vl_registry_write: 'warn',
|
|
57
57
|
vlax_without_loading: 'warn',
|
|
@@ -137,7 +137,7 @@ const DEFAULT_CONFIG = {
|
|
|
137
137
|
dangerous_calls: {
|
|
138
138
|
quit: 'error',
|
|
139
139
|
exit: 'error',
|
|
140
|
-
command_shell: '
|
|
140
|
+
command_shell: 'warn',
|
|
141
141
|
startapp: 'warn',
|
|
142
142
|
vl_registry_write: 'warn',
|
|
143
143
|
},
|
package/dist/index.js
CHANGED
|
@@ -164,10 +164,11 @@ function* walkFiles(dir, rootDir, regex) {
|
|
|
164
164
|
function globFiles(pattern, rootDir) {
|
|
165
165
|
const regexStr = pattern
|
|
166
166
|
.replace(/\./g, '\\.')
|
|
167
|
-
.replace(/\*\*\//g, '
|
|
167
|
+
.replace(/\*\*\//g, '\x00GLOB\x00')
|
|
168
168
|
.replace(/\*\*/g, '.*')
|
|
169
169
|
.replace(/\*/g, '[^/]*')
|
|
170
|
-
.replace(/\?/g, '.')
|
|
170
|
+
.replace(/\?/g, '.')
|
|
171
|
+
.replace(/\x00GLOB\x00/g, '(.*/)?');
|
|
171
172
|
const regex = new RegExp(`^${regexStr}$`);
|
|
172
173
|
return Array.from(walkFiles(rootDir, rootDir, regex));
|
|
173
174
|
}
|
|
@@ -195,7 +196,11 @@ function collectFiles(rootDir, opts, config) {
|
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
const excludePatterns = config.source.exclude.map(e => {
|
|
198
|
-
const str = e
|
|
199
|
+
const str = e
|
|
200
|
+
.replace(/\./g, '\\.')
|
|
201
|
+
.replace(/\*\*/g, '\x00STAR\x00')
|
|
202
|
+
.replace(/\*/g, '[^/]*')
|
|
203
|
+
.replace(/\x00STAR\x00/g, '.*');
|
|
199
204
|
return new RegExp(`^${str}$`);
|
|
200
205
|
});
|
|
201
206
|
return Array.from(files)
|
package/dist/presets.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.PRESETS = {
|
|
|
8
8
|
encoding: 'error',
|
|
9
9
|
cl_syntax: 'warn',
|
|
10
10
|
quit_exit: 'error',
|
|
11
|
-
command_shell: '
|
|
11
|
+
command_shell: 'warn',
|
|
12
12
|
startapp: 'warn',
|
|
13
13
|
vl_registry_write: 'warn',
|
|
14
14
|
token_in_url: 'warn',
|
|
@@ -74,7 +74,7 @@ exports.PRESETS = {
|
|
|
74
74
|
encoding: 'error',
|
|
75
75
|
cl_syntax: 'error',
|
|
76
76
|
quit_exit: 'error',
|
|
77
|
-
command_shell: '
|
|
77
|
+
command_shell: 'warn',
|
|
78
78
|
startapp: 'error',
|
|
79
79
|
vl_registry_write: 'error',
|
|
80
80
|
vlax_without_loading: 'error',
|
|
@@ -152,7 +152,7 @@ exports.PRESETS = {
|
|
|
152
152
|
parens: 'error',
|
|
153
153
|
encoding: 'error',
|
|
154
154
|
quit_exit: 'error',
|
|
155
|
-
command_shell: '
|
|
155
|
+
command_shell: 'warn',
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
158
|
};
|