We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The formatter is smart enough to indent the comment here because no case follows it:
case
class Main { static function main() { switch ("c") { case "a": case "b": case _: // nothing to do } } }
Maybe it should be indented here too, because case "a" is empty (so it's unlikely to be a comment belonging to the next case):
case "a"
class Main { static function main() { switch ("c") { case "a": // nothing to do case "b": case _: } } }
The text was updated successfully, but these errors were encountered:
(consequently, in case of the case not being empty, it would look this)
class Main { static function main() { switch ("c") { case "a": trace("foo"); // check for "b" case "b": case _: } } }
Sorry, something went wrong.
Just hitting similar problem (with default hxformat.json)
I wish there was a setting to just keep the current comment indentation in the case, as currently, the following code:
enum MyEnum { A; B; C; D; } class Main { public static function main() { var value:MyEnum = Math.random() < 0.5 ? A : B; switch value { case A: // Case A case B: // Case B trace('hello'); case C: // Case C case D: // Case D } } }
Brings me the following result:
fixed comment indentation in empty switch cases, fixes HaxeCheckstyle…
d91aad4
…#392, HaxeCheckstyle#174
897f5d1
No branches or pull requests
The formatter is smart enough to indent the comment here because no
case
follows it:Maybe it should be indented here too, because
case "a"
is empty (so it's unlikely to be a comment belonging to the nextcase
):The text was updated successfully, but these errors were encountered: