Skip to content

Comment indentation in case #392

@Gama11

Description

@Gama11

The formatter is smart enough to indent the comment here because no case follows it:

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):

class Main {
	static function main() {
		switch ("c") {
			case "a":
			// nothing to do
			case "b":
			case _:
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestindentationIndentation is incorrect

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions