Skip to content

Commit

Permalink
fix: files not linting
Browse files Browse the repository at this point in the history
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 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.

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.
  • Loading branch information
stevenh committed Nov 24, 2023
1 parent a8ad083 commit 69194da
Show file tree
Hide file tree
Showing 16 changed files with 299 additions and 171 deletions.
75 changes: 72 additions & 3 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,47 +82,68 @@
"WORKDIR",
"Whitespaces",
"aestasit",
"Affero",
"agorapulse",
"analyse",
"anymatch",
"appender",
"Appender",
"archy",
"argparse",
"arity",
"arrayish",
"atlassian",
"Autofixable",
"autofixing",
"beakerx",
"behaviour",
"Behl",
"Behlül",
"blablabla",
"Blablabla",
"btime",
"callsites",
"camelcase",
"cdci",
"chardet",
"Charsets",
"chownr",
"circleci",
"CLASSNAME",
"CLASSPATH",
"clientid",
"cliui",
"Cloneable",
"Codacy",
"codecov",
"codehaus",
"codenarc",
"Codenarc",
"CODENARC",
"codenarcargs",
"Commandline",
"commondir",
"COPYPASTE",
"Creds",
"cvfm",
"decamelize",
"dfsg",
"Dlogging",
"docwhat",
"Dorg",
"dotenv",
"doublons",
"ecnfo",
"ECONNREFUSED",
"entrypoint",
"ENTRYPOINT",
"eslintcache",
"espree",
"esquery",
"esrecurse",
"estraverse",
"esutils",
"ETIMEOUT",
"excptn",
"extglob",
"failon",
Expand All @@ -131,14 +152,19 @@
"failonwarning",
"favicon",
"filechooser",
"FILEIO",
"fileoverview",
"fileset",
"finalise",
"Finalizers",
"fixrules",
"Fixrules",
"flattendeep",
"fontawesome",
"Fresources",
"fromentries",
"fsevents",
"Ftest",
"fullwidth",
"gaelyk",
"gaiden",
Expand All @@ -148,6 +174,7 @@
"getownpropertydescriptors",
"gitattributes",
"gmetrics",
"Gorm",
"gpars",
"gperfutils",
"gprof",
Expand All @@ -165,21 +192,30 @@
"grooylintrc",
"hadolint",
"hasha",
"Hashtable",
"hostedtoolcache",
"httpbuilder",
"httpserver",
"ignorepattern",
"imurmurhash",
"Inet",
"ìnfo",
"infrastructor",
"Instanceof",
"Intall",
"isarray",
"isexe",
"Javadoc",
"javaexecutable",
"javaoptions",
"javascripts",
"javax",
"jdbc",
"Jdbc",
"jdeploy",
"jenkinsfile",
"Jenkinsfile",
"Jenkinsfiles",
"jenkinsjobdsl",
"jenkinspipeline",
"jenkinssharedlib",
Expand All @@ -194,6 +230,7 @@
"katalon",
"killserver",
"kisswebframework",
"Kopka",
"lcov",
"lelama",
"lelamanul",
Expand All @@ -202,16 +239,23 @@
"lintagainafterfix",
"logback",
"loglevel",
"Loopback",
"markdownlint",
"materialx",
"megalinter",
"Metadatas",
"Microbundle",
"micronaut",
"microservice",
"minipass",
"minizlib",
"Misordered",
"mkdocs",
"modelcatalogue",
"mygroovyfile",
"MYOTHERVAR",
"MYVAR",
"NEWLINECLOSINGBRACE",
"nextflow",
"njre",
"nolintafter",
Expand All @@ -220,13 +264,18 @@
"notif",
"notkept",
"nuxt",
"Nuxt",
"nvuillam",
"Objs",
"occurrences",
"openjdk",
"optionator",
"OPTIONNAME",
"optns",
"orgs",
"overridden",
"PARAMNAME",
"Pawel",
"pawelkopka",
"pckg",
"pdxc",
Expand All @@ -235,27 +284,39 @@
"pids",
"pify",
"preload",
"Println",
"processinfo",
"promisified",
"PROSELINT",
"pymdownx",
"ratpack",
"readdirp",
"regexpp",
"restassured",
"returnrules",
"ruleset",
"Ruleset",
"rulesetfiles",
"rulesets",
"Rulesets",
"rulesetsoverridetype",
"sarif",
"Sarif",
"SARIF",
"SEMGREP",
"Serv",
"serverhost",
"serverport",
"Servlet",
"setalias",
"sfdx",
"simplelogger",
"Slctn",
"Slurper",
"soapui",
"socio",
"sourcefilepath",
"sourcefiles",
"spdx",
"spreadsheetbuilder",
"springboot",
Expand All @@ -267,17 +328,21 @@
"stehno",
"stevenh",
"stylelint",
"Sublicensing",
"superlite",
"sysgears",
"Tablesort",
"tmptest",
"trimend",
"trimleft",
"trimright",
"trimstart",
"TRIVY",
"tsbuildinfo",
"twemoji",
"twhateverelse",
"typedarray",
"Uçar",
"ufeff",
"uncommented",
"universalify",
Expand All @@ -286,17 +351,21 @@
"updt",
"uuidv",
"uuuurf",
"VARNAME",
"vertx",
"vuepress",
"Vuillamy",
"warhod",
"wesh",
"whateverelse",
"Whitespaces",
"WIPO",
"WORKDIR",
"wrappy",
"wscript",
"yallist",
"yessss",
"zalgo",
"zpars",
"\u00ecnfo"
"zpars"
]
}
}
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## UNRELEASED

## [12.1.2] 2023-11-23

- Revert update that output json when not requested

## [12.1.1] 2023-11-19

- Upgrade node-java-caller to v3.1.1
Expand Down
14 changes: 7 additions & 7 deletions groovy/src/main/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Class-Path: CodeNarc-3.1.0.jar GMetrics-2.1.0.jar groovy/lib/ant-1.10.
11.jar groovy/lib/ant-launcher-1.10.11.jar groovy/lib/commons-cli-1.4
.jar groovy/lib/groovy-3.0.9.jar groovy/lib/groovy-ant-3.0.9.jar groo
vy/lib/groovy-cli-commons-3.0.9.jar groovy/lib/groovy-dateutil-3.0.9.
jar groovy/lib/groovy-json-3.0.9.jar groovy/lib/groovy-templates-3.0.
9.jar groovy/lib/groovy-xml-3.0.9.jar logback-classic-1.4.9.jar logba
ck-core-1.4.9.jar slf4j-api-2.0.9.jar
Class-Path: CodeNarc-3.3.0-pre.jar GMetrics-2.1.0.jar groovy/lib/ant-1
.10.11.jar groovy/lib/ant-launcher-1.10.11.jar groovy/lib/commons-cli
-1.4.jar groovy/lib/groovy-3.0.9.jar groovy/lib/groovy-ant-3.0.9.jar
groovy/lib/groovy-cli-commons-3.0.9.jar groovy/lib/groovy-dateutil-3.
0.9.jar groovy/lib/groovy-json-3.0.9.jar groovy/lib/groovy-templates-
3.0.9.jar groovy/lib/groovy-xml-3.0.9.jar logback-classic-1.4.9.jar l
ogback-core-1.4.9.jar slf4j-api-2.0.9.jar
Created-By: 1.8.0_144 (Oracle Corporation)
Main-Class: com.nvuillam.CodeNarcServer
Loading

0 comments on commit 69194da

Please sign in to comment.