diff --git a/CHANGELOG.md b/CHANGELOG.md index 907dcf77..11cd6c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## dev branch / next version (2.x.x) +## version 2.8.2 (2022-09-14) + +- Updated haxeparser and tokentree libs to support latest Haxe nightly syntax ([#514](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/514)) + ## version 2.8.1 (2022-09-07) - Added support for inline markup ([#513](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/513)) diff --git a/haxe_libraries/haxeparser.hxml b/haxe_libraries/haxeparser.hxml index c6046d15..42b3c717 100644 --- a/haxe_libraries/haxeparser.hxml +++ b/haxe_libraries/haxeparser.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#1ea2a8915956ac3af6f1a11c67e0e56261b75929" into haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929 +# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#f0a7f07101c14dc32b0964dd52af8dcaa322e178" into haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178 -lib hxparse --cp ${HAXE_LIBCACHE}/haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929/src --D haxeparser=3.3.0 \ No newline at end of file +-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178/src +-D haxeparser=4.3.0-rc.1 \ No newline at end of file diff --git a/haxe_libraries/hxparse.hxml b/haxe_libraries/hxparse.hxml index c1c0c6d2..a8026712 100644 --- a/haxe_libraries/hxparse.hxml +++ b/haxe_libraries/hxparse.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "gh://github.com/Simn/hxparse#93f67419852e96daa2b81901c43a77e878c8c2bc" into hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc --cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc/src --D hxparse=4.0.1 +# @install: lix --silent download "gh://github.com/simn/hxparse#32e376f80c4b0e999e9f3229947d4dac2138382b" into hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b +-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b/src +-D hxparse=4.0.1 \ No newline at end of file diff --git a/haxe_libraries/tokentree.hxml b/haxe_libraries/tokentree.hxml index f91fbcc6..70d059ab 100644 --- a/haxe_libraries/tokentree.hxml +++ b/haxe_libraries/tokentree.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "haxelib:/tokentree#1.2.1" into tokentree/1.2.1/haxelib --cp ${HAXE_LIBCACHE}/tokentree/1.2.1/haxelib/src --D tokentree=1.2.1 \ No newline at end of file +# @install: lix --silent download "haxelib:/tokentree#1.2.3" into tokentree/1.2.3/haxelib +-cp ${HAXE_LIBCACHE}/tokentree/1.2.3/haxelib/src +-D tokentree=1.2.3 \ No newline at end of file diff --git a/haxelib.json b/haxelib.json index ecee69d6..62b77f0b 100644 --- a/haxelib.json +++ b/haxelib.json @@ -18,8 +18,8 @@ "adireddy", "Gama11" ], - "releasenote": "added support for inline markup - see CHANGELOG", - "version": "2.8.1", + "releasenote": "updated haxeparser and tokentree libs to support latest Haxe nightly syntax - see CHANGELOG", + "version": "2.8.2", "url": "https://github.com/HaxeCheckstyle/haxe-checkstyle", "dependencies": {} } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 41075ae0..ba0de5b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@haxecheckstyle/haxe-checkstyle", - "version": "2.8.1", + "version": "2.8.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@haxecheckstyle/haxe-checkstyle", - "version": "2.8.1", + "version": "2.8.2", "license": "MIT", "bin": { "haxe-checkstyle": "bin/checkstyle.js" diff --git a/package.json b/package.json index b55b0586..dd4dfa0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@haxecheckstyle/haxe-checkstyle", - "version": "2.8.1", + "version": "2.8.2", "description": "Automated code analysis ideal for projects that want to enforce a coding standard.", "repository": { "type": "git", diff --git a/src/checkstyle/checks/imports/UnusedImportCheck.hx b/src/checkstyle/checks/imports/UnusedImportCheck.hx index 277b59d7..9251931d 100644 --- a/src/checkstyle/checks/imports/UnusedImportCheck.hx +++ b/src/checkstyle/checks/imports/UnusedImportCheck.hx @@ -127,7 +127,7 @@ class UnusedImportCheck extends Check { case Kwd(KwdPackage): case Semicolon: return moduleName.toString(); - case Binop(OpIn): + case Kwd(KwdIn) | Binop(OpIn): if (token.parent.tok.match(Dot)) moduleName.add(token.toString()); else moduleName.add(" in "); case Const(CIdent("as")): diff --git a/src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx b/src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx index db538db1..a5b6138d 100644 --- a/src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx +++ b/src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx @@ -249,6 +249,14 @@ class OperatorWhitespaceCheck extends WhitespaceCheckBase { return switch (token.tok) { case Binop(OpInterval): FoundSkipSubtree; case IntInterval(_): FoundSkipSubtree; + case Spread: + if (token.parent == null) return GoDeeper; + switch (token.parent.tok) { + case POpen: + return GoDeeper; + default: + FoundSkipSubtree; + } default: GoDeeper; } });