diff --git a/CHANGELOG.md b/CHANGELOG.md index c6642e5..05d8aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed whitespace before null safety operator - Fixed keeping same line for `macro if` expressions - Fixed wrapping with maxLineLength off by one, fixes [#670](https://github.com/HaxeCheckstyle/haxe-formatter/issues/670) ([#671](https://github.com/HaxeCheckstyle/haxe-formatter/issues/671)) +- Fixed extends wrapping for interfaces, fixes [#669](https://github.com/HaxeCheckstyle/haxe-formatter/issues/669) ## version 1.14.6 (2023-02-22) diff --git a/haxe_libraries/haxeparser.hxml b/haxe_libraries/haxeparser.hxml index 8024a81..d42c8d5 100644 --- a/haxe_libraries/haxeparser.hxml +++ b/haxe_libraries/haxeparser.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#3dee8397958a7dd79ad27f1b84ca386d365e2166" into haxeparser/4.3.0-rc.1/github/3dee8397958a7dd79ad27f1b84ca386d365e2166 +# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#7e98c9aef901b8e26541cf3f8a6e1da0385b237a" into haxeparser/4.3.0-rc.1/github/7e98c9aef901b8e26541cf3f8a6e1da0385b237a -lib hxparse --cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/3dee8397958a7dd79ad27f1b84ca386d365e2166/src +-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/7e98c9aef901b8e26541cf3f8a6e1da0385b237a/src -D haxeparser=4.3.0-rc.1 \ No newline at end of file diff --git a/haxe_libraries/test-adapter.hxml b/haxe_libraries/test-adapter.hxml index f041683..2fde4ca 100644 --- a/haxe_libraries/test-adapter.hxml +++ b/haxe_libraries/test-adapter.hxml @@ -1,5 +1,5 @@ -# @install: lix --silent download "haxelib:/test-adapter#2.0.4" into test-adapter/2.0.4/haxelib +# @install: lix --silent download "haxelib:/test-adapter#2.0.5" into test-adapter/2.0.5/haxelib -lib json2object --cp ${HAXE_LIBCACHE}/test-adapter/2.0.4/haxelib/ --D test-adapter=2.0.4 +-cp ${HAXE_LIBCACHE}/test-adapter/2.0.5/haxelib/ +-D test-adapter=2.0.5 --macro _testadapter.Macro.init() \ No newline at end of file diff --git a/haxe_libraries/tokentree.hxml b/haxe_libraries/tokentree.hxml index 970b9d0..33ff084 100644 --- a/haxe_libraries/tokentree.hxml +++ b/haxe_libraries/tokentree.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "gh://github.com/HaxeCheckstyle/tokentree#fa4062c5c4c40ad4bc38a521a26515d1d13aa691" into tokentree/1.2.8/github/fa4062c5c4c40ad4bc38a521a26515d1d13aa691 --cp ${HAXE_LIBCACHE}/tokentree/1.2.8/github/fa4062c5c4c40ad4bc38a521a26515d1d13aa691/src --D tokentree=1.2.8 \ No newline at end of file +# @install: lix --silent download "haxelib:/tokentree#1.2.10" into tokentree/1.2.10/haxelib +-cp ${HAXE_LIBCACHE}/tokentree/1.2.10/haxelib/src +-D tokentree=1.2.10 \ No newline at end of file diff --git a/test/testcases/other/unicode_regex.hxtest b/test/testcases/other/unicode_regex.hxtest new file mode 100644 index 0000000..ceb022e --- /dev/null +++ b/test/testcases/other/unicode_regex.hxtest @@ -0,0 +1,9 @@ +{} + +--- + +static final ctrlCharacters = ~/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/g; + +--- + +static final ctrlCharacters = ~/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/g; diff --git a/test/testcases/wrapping/issue_669_interface_extends_wrapping.hxtest b/test/testcases/wrapping/issue_669_interface_extends_wrapping.hxtest new file mode 100644 index 0000000..1b71e98 --- /dev/null +++ b/test/testcases/wrapping/issue_669_interface_extends_wrapping.hxtest @@ -0,0 +1,45 @@ +{ + "wrapping": { + "implementsExtends": { + "defaultWrap": "onePerLineAfterFirst" + }, + "maxLineLength": 80 + } +} + +--- + +interface MyInterface extends MyInterface1 extends MyInterface2 extends MyInterface3 extends MyInterface4 { + public var foo: String; +} + +class MyInterface implements MyInterface1 implements MyInterface2 implements MyInterface3 implements MyInterface4 { + public var foo: String; +} + +class MyInterface extends MyInterface1 implements MyInterface2 implements MyInterface3 implements MyInterface4 { + public var foo: String; +} + +--- + +interface MyInterface extends MyInterface1 +extends MyInterface2 +extends MyInterface3 +extends MyInterface4 { + public var foo:String; +} + +class MyInterface implements MyInterface1 +implements MyInterface2 +implements MyInterface3 +implements MyInterface4 { + public var foo:String; +} + +class MyInterface extends MyInterface1 +implements MyInterface2 +implements MyInterface3 +implements MyInterface4 { + public var foo:String; +}