Skip to content
New issue

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

Incorrect indentation for #partial switch cases #17

Open
jonasgf opened this issue Jul 19, 2024 · 2 comments
Open

Incorrect indentation for #partial switch cases #17

jonasgf opened this issue Jul 19, 2024 · 2 comments

Comments

@jonasgf
Copy link

jonasgf commented Jul 19, 2024

The current indentation rules handle #partial switch differently from regular switch statements, resulting in incorrect indentation for case lines within #partial switch. Below is an example illustrating the issue:

hellope :: proc() {
	switch foo {
	case bar:
		baz
	}

	#partial switch foo {
		case bar:
		baz
	}
}
@jonasgf
Copy link
Author

jonasgf commented Jul 19, 2024

One additional problem is that the default case: is not handled properly as well. Just noting it here since it is also probably caused by the usage of js-indent-line where I'm assuming neither of these cases are valid.

@mattt-b
Copy link
Owner

mattt-b commented Jul 27, 2024

I appreciate you bringing this up.

I did not write the implementation in this repo, nor do I write Odin anymore. I keep this repo up only because the original author deleted theirs.

I would welcome any PRs fixing any issues, but I won't be fixing this myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants