Skip to content

Commit f2f7cb0

Browse files
authored
fix: files not linting (#320)
Fix files specified on the command line not linting as expected due to the generated patterns not working as intended if relative path that contains a file and not a directory due to an issue with CodeNarc pattern processing. Fix incompatible arguments passed to CodeNarc by: * Using arrays internally to avoid issues with spaces in arguments being interpreted incorrectly. * Stripping all quotes from string arguments as CodeNarc doesn't handle them correctly. * Enable automatic argument quoting on Windows. Fix command line -ext extensions not being processed correctly and matching too many files as it was missing the prefix. Ensure readFile and writeFile calls produce a stack trace on failure due to: nodejs/node#30944. Fix file delete race condition and variable clean up due to missing await. Fix use of includes instead of exclude parameters. Also: * Fixed Request failed logging * Fix README.md typo * Add additional useful debug logging * Run dev:pre-commit to update CHANGELOG.md * Add more cspell entries * Add missing items to CodeNarcServer.groovy usage * Re-enable tests which are now fixed * Override axios for security patch
1 parent a49cc59 commit f2f7cb0

19 files changed

+406
-269
lines changed

.cspell.json

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,47 +82,68 @@
8282
"WORKDIR",
8383
"Whitespaces",
8484
"aestasit",
85+
"Affero",
8586
"agorapulse",
8687
"analyse",
8788
"anymatch",
8889
"appender",
90+
"Appender",
8991
"archy",
9092
"argparse",
9193
"arity",
9294
"arrayish",
9395
"atlassian",
96+
"Autofixable",
9497
"autofixing",
9598
"beakerx",
9699
"behaviour",
100+
"Behl",
101+
"Behlül",
97102
"blablabla",
103+
"Blablabla",
98104
"btime",
99105
"callsites",
100106
"camelcase",
101107
"cdci",
102108
"chardet",
109+
"Charsets",
103110
"chownr",
104111
"circleci",
112+
"CLASSNAME",
113+
"CLASSPATH",
105114
"clientid",
106115
"cliui",
116+
"Cloneable",
117+
"Codacy",
107118
"codecov",
108119
"codehaus",
109120
"codenarc",
121+
"Codenarc",
122+
"CODENARC",
110123
"codenarcargs",
124+
"Commandline",
111125
"commondir",
126+
"COPYPASTE",
127+
"Creds",
112128
"cvfm",
113129
"decamelize",
114130
"dfsg",
131+
"Dlogging",
115132
"docwhat",
133+
"Dorg",
116134
"dotenv",
117135
"doublons",
118136
"ecnfo",
137+
"ECONNREFUSED",
119138
"entrypoint",
139+
"ENTRYPOINT",
120140
"eslintcache",
121141
"espree",
122142
"esquery",
123143
"esrecurse",
124144
"estraverse",
125145
"esutils",
146+
"ETIMEOUT",
126147
"excptn",
127148
"extglob",
128149
"failon",
@@ -131,14 +152,19 @@
131152
"failonwarning",
132153
"favicon",
133154
"filechooser",
155+
"FILEIO",
134156
"fileoverview",
135157
"fileset",
136158
"finalise",
159+
"Finalizers",
137160
"fixrules",
161+
"Fixrules",
138162
"flattendeep",
139163
"fontawesome",
164+
"Fresources",
140165
"fromentries",
141166
"fsevents",
167+
"Ftest",
142168
"fullwidth",
143169
"gaelyk",
144170
"gaiden",
@@ -148,6 +174,7 @@
148174
"getownpropertydescriptors",
149175
"gitattributes",
150176
"gmetrics",
177+
"Gorm",
151178
"gpars",
152179
"gperfutils",
153180
"gprof",
@@ -165,21 +192,30 @@
165192
"grooylintrc",
166193
"hadolint",
167194
"hasha",
195+
"Hashtable",
168196
"hostedtoolcache",
169197
"httpbuilder",
170198
"httpserver",
171199
"ignorepattern",
172200
"imurmurhash",
201+
"Inet",
202+
"ìnfo",
173203
"infrastructor",
204+
"Instanceof",
205+
"Intall",
174206
"isarray",
175207
"isexe",
208+
"Javadoc",
176209
"javaexecutable",
177210
"javaoptions",
178211
"javascripts",
179212
"javax",
180213
"jdbc",
214+
"Jdbc",
181215
"jdeploy",
182216
"jenkinsfile",
217+
"Jenkinsfile",
218+
"Jenkinsfiles",
183219
"jenkinsjobdsl",
184220
"jenkinspipeline",
185221
"jenkinssharedlib",
@@ -194,6 +230,7 @@
194230
"katalon",
195231
"killserver",
196232
"kisswebframework",
233+
"Kopka",
197234
"lcov",
198235
"lelama",
199236
"lelamanul",
@@ -202,16 +239,23 @@
202239
"lintagainafterfix",
203240
"logback",
204241
"loglevel",
242+
"Loopback",
205243
"markdownlint",
206244
"materialx",
207245
"megalinter",
246+
"Metadatas",
247+
"Microbundle",
208248
"micronaut",
209249
"microservice",
210250
"minipass",
211251
"minizlib",
252+
"Misordered",
212253
"mkdocs",
213254
"modelcatalogue",
214255
"mygroovyfile",
256+
"MYOTHERVAR",
257+
"MYVAR",
258+
"NEWLINECLOSINGBRACE",
215259
"nextflow",
216260
"njre",
217261
"nolintafter",
@@ -220,13 +264,18 @@
220264
"notif",
221265
"notkept",
222266
"nuxt",
267+
"Nuxt",
223268
"nvuillam",
269+
"Objs",
224270
"occurrences",
225271
"openjdk",
226272
"optionator",
273+
"OPTIONNAME",
227274
"optns",
228275
"orgs",
229276
"overridden",
277+
"PARAMNAME",
278+
"Pawel",
230279
"pawelkopka",
231280
"pckg",
232281
"pdxc",
@@ -235,27 +284,39 @@
235284
"pids",
236285
"pify",
237286
"preload",
287+
"Println",
238288
"processinfo",
239289
"promisified",
290+
"PROSELINT",
240291
"pymdownx",
241292
"ratpack",
242293
"readdirp",
243294
"regexpp",
244295
"restassured",
245296
"returnrules",
246297
"ruleset",
298+
"Ruleset",
247299
"rulesetfiles",
248300
"rulesets",
301+
"Rulesets",
249302
"rulesetsoverridetype",
250303
"sarif",
304+
"Sarif",
305+
"SARIF",
306+
"SEMGREP",
307+
"Serv",
251308
"serverhost",
252309
"serverport",
310+
"Servlet",
253311
"setalias",
254312
"sfdx",
255313
"simplelogger",
314+
"Slctn",
315+
"Slurper",
256316
"soapui",
257317
"socio",
258318
"sourcefilepath",
319+
"sourcefiles",
259320
"spdx",
260321
"spreadsheetbuilder",
261322
"springboot",
@@ -267,17 +328,21 @@
267328
"stehno",
268329
"stevenh",
269330
"stylelint",
331+
"Sublicensing",
270332
"superlite",
271333
"sysgears",
334+
"Tablesort",
272335
"tmptest",
273336
"trimend",
274337
"trimleft",
275338
"trimright",
276339
"trimstart",
340+
"TRIVY",
277341
"tsbuildinfo",
278342
"twemoji",
279343
"twhateverelse",
280344
"typedarray",
345+
"Uçar",
281346
"ufeff",
282347
"uncommented",
283348
"universalify",
@@ -286,17 +351,21 @@
286351
"updt",
287352
"uuidv",
288353
"uuuurf",
354+
"VARNAME",
289355
"vertx",
290356
"vuepress",
357+
"Vuillamy",
291358
"warhod",
292359
"wesh",
293360
"whateverelse",
361+
"Whitespaces",
362+
"WIPO",
363+
"WORKDIR",
294364
"wrappy",
295365
"wscript",
296366
"yallist",
297367
"yessss",
298368
"zalgo",
299-
"zpars",
300-
"\u00ecnfo"
369+
"zpars"
301370
]
302-
}
371+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## UNRELEASED
44

5+
- Fix files specified on the command line not linting as expected
6+
- Fix incompatible arguments passed to CodeNarc
7+
- Fix command line -ext extensions not being processed
8+
- Fix use of includes instead of exclude parameters
9+
510
## [12.2.0] 2023-11-26
611

712
- Upgrade java-caller dependency to 3.2.0 (Now handles Mac M1)

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## UNRELEASED
44

5+
- Fix files specified on the command line not linting as expected
6+
- Fix incompatible arguments passed to CodeNarc
7+
- Fix command line -ext extensions not being processed
8+
- Fix use of includes instead of exclude parameters
9+
510
## [12.2.0] 2023-11-26
611

712
- Upgrade java-caller dependency to 3.2.0 (Now handles Mac M1)

groovy/src/main/MANIFEST.MF

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Manifest-Version: 1.0
2-
Class-Path: CodeNarc-3.1.0.jar GMetrics-2.1.0.jar groovy/lib/ant-1.10.
3-
11.jar groovy/lib/ant-launcher-1.10.11.jar groovy/lib/commons-cli-1.4
4-
.jar groovy/lib/groovy-3.0.9.jar groovy/lib/groovy-ant-3.0.9.jar groo
5-
vy/lib/groovy-cli-commons-3.0.9.jar groovy/lib/groovy-dateutil-3.0.9.
6-
jar groovy/lib/groovy-json-3.0.9.jar groovy/lib/groovy-templates-3.0.
7-
9.jar groovy/lib/groovy-xml-3.0.9.jar logback-classic-1.4.9.jar logba
8-
ck-core-1.4.9.jar slf4j-api-2.0.9.jar
2+
Class-Path: CodeNarc-3.4.0-alpha+3346775f.jar GMetrics-2.1.0.jar groov
3+
y/lib/ant-1.10.11.jar groovy/lib/ant-launcher-1.10.11.jar groovy/lib/
4+
commons-cli-1.4.jar groovy/lib/groovy-3.0.9.jar groovy/lib/groovy-ant
5+
-3.0.9.jar groovy/lib/groovy-cli-commons-3.0.9.jar groovy/lib/groovy-
6+
dateutil-3.0.9.jar groovy/lib/groovy-json-3.0.9.jar groovy/lib/groovy
7+
-templates-3.0.9.jar groovy/lib/groovy-xml-3.0.9.jar logback-classic-
8+
1.4.9.jar logback-core-1.4.9.jar slf4j-api-2.0.9.jar
99
Created-By: 1.8.0_144 (Oracle Corporation)
1010
Main-Class: com.nvuillam.CodeNarcServer

0 commit comments

Comments
 (0)