Skip to content

Commit

Permalink
fixed extends wrapping for interfaces, fixes #669
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed May 21, 2023
1 parent e4c3fdf commit 1e94f19
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions haxe_libraries/haxeparser.hxml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions haxe_libraries/test-adapter.hxml
Original file line number Diff line number Diff line change
@@ -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()
6 changes: 3 additions & 3 deletions haxe_libraries/tokentree.hxml
Original file line number Diff line number Diff line change
@@ -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
# @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
9 changes: 9 additions & 0 deletions test/testcases/other/unicode_regex.hxtest
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 1e94f19

Please sign in to comment.