Skip to content

Commit

Permalink
fixed WhitespacePolicy compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Oct 22, 2024
1 parent 741af90 commit 3f0103f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (1.x.x)

## version 1.17.1 (2024-10-22)

- Fixed WhitespacePolicy compilation error

## version 1.17.0 (2024-10-06)

- **Breaking Change** replaced `whitespace.openingBracketPolicy` and `whitespace.closingBracketPolicy` settings with `whitespace.bracketConfig`, fixes [#592](https://github.com/HaxeCheckstyle/haxe-formatter/issues/592)
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"style"
],
"description": "A code formatter for Haxe",
"version": "1.17.0",
"releasenote": "Added more wrapping conditions; fixed various issues affecting a whole bunch of special cases - see CHANGELOG for details.",
"version": "1.17.1",
"releasenote": "Fixed WhitespacePolicy error - see CHANGELOG for details.",
"contributors": [
"AlexHaxe",
"Gama11"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@haxecheckstyle/haxe-formatter",
"version": "1.17.0",
"version": "1.17.1",
"description": "A code formatter for Haxe",
"repository": {
"type": "git",
Expand Down
14 changes: 0 additions & 14 deletions resources/default-hxformat.json
Original file line number Diff line number Diff line change
Expand Up @@ -921,20 +921,6 @@
}
]
},
"opAssignWrap": {
"defaultWrap": "noWrap",
"rules": [
{
"conditions": [
{
"cond": "exceedsMaxLineLength",
"value": 1
}
],
"type": "fillLineWithLeadingBreak"
}
]
},
"opBoolChain": {
"defaultWrap": "noWrap",
"rules": [
Expand Down
4 changes: 0 additions & 4 deletions resources/hxformat-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1283,10 +1283,6 @@
"description": "call parameter wrapping rules",
"$ref": "#/definitions/formatter.config.WrapRules"
},
"opAssignWrap": {
"description": "chain wrapping rules for case patterns",
"$ref": "#/definitions/formatter.config.WrapRules"
},
"arrayMatrixWrap": {
"description": "detect arrays in matrix configuration from source noMatrixWrap = no detection matrixWrapNoAlign = detect and format as matrix without alignment matrixWrapWithAlign = detect and format as matrix and align columns",
"$ref": "#/definitions/formatter.config.ArrayMatrixWrap",
Expand Down
2 changes: 1 addition & 1 deletion src/formatter/config/WhitespacePolicy.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enum abstract WhitespacePolicy(String) {
var Around = "around";

public static function has(policy:WhitespacePolicy, wantPolicy:WhitespacePolicy):Bool {
return (policy.remove(wantPolicy) != policy);
return (remove(policy, wantPolicy) != policy);
}

public static function remove(policy:WhitespacePolicy, removePolicy:WhitespacePolicy):WhitespacePolicy {
Expand Down

0 comments on commit 3f0103f

Please sign in to comment.