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

Support parameter name comment #661

Open
zommerfelds opened this issue Nov 21, 2022 · 0 comments
Open

Support parameter name comment #661

zommerfelds opened this issue Nov 21, 2022 · 0 comments
Labels
enhancement New feature or request lineends line end handling sameline broken same line formatting wrapping Incorrect or undesirable wrapping

Comments

@zommerfelds
Copy link

Support for /* paramName= */ foo

It would be really nice I was able to get something like this:

class Main {
	static function main() {
                func(
                        /* paramA= */ 123,
                        /* paramB= */ 456,
                        /* paramC= */ 987);
	}
}

This type of comment is recommended by the Google Java styleguide, and I find it quite useful:
https://errorprone.info/bugpattern/ParameterName

With onePerLine this is what haxe-formatter currently produces:

			new MonsterComponent(
				/* checkSightContact= */ type == Alien1, /* playerInSight= */
				false, /* lineOfSight= */
				lineOfSightObj, /* playerInSightWarning= */
				text, /* patrol= */
				patrol, /* curPatrolIndex= */
				0,
				/* doneMoving= */
				false
			),
@AlexHaxe AlexHaxe added enhancement New feature or request wrapping Incorrect or undesirable wrapping sameline broken same line formatting lineends line end handling labels Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lineends line end handling sameline broken same line formatting wrapping Incorrect or undesirable wrapping
Projects
None yet
Development

No branches or pull requests

2 participants