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

Oscillating callParameter output #640

Open
zommerfelds opened this issue Jul 27, 2021 · 0 comments
Open

Oscillating callParameter output #640

zommerfelds opened this issue Jul 27, 2021 · 0 comments
Labels
unstable output changes with multiple formatting passes wrapping Incorrect or undesirable wrapping

Comments

@zommerfelds
Copy link

Describe the bug

The output is not stable and changes between two states on every Ctrl-S (auto-format).

Input file

class Sound {
	public static function init() {
		wavesChannel = hxd.Res.waves.play(
			/* loop= */ true,
			/* volume= */ 0.0,
			/* channelGroup= */ null,
			/* soundGroup= */ ambianceSounds
		);
	}
}

Broken output
State 1:

		wavesChannel = hxd.Res.waves.play(
			/* loop= */ true, /* volume= */
			0.0, /* channelGroup= */
			null, /* soundGroup= */
			ambianceSounds
		);

State 2:

		wavesChannel = hxd.Res.waves.play(/* loop= */
			true, /* volume= */ 0.0, /* channelGroup= */ null, /* soundGroup= */ ambianceSounds);

Expected output
A fixed output and not oscillating.

Optional: hxformat.json

{
    "wrapping": {
        "maxLineLength": 130,
        "callParameter": {
            "rules": [
                {
                    "conditions": [
                        {
                            "cond": "exceedsMaxLineLength"
                        }
                    ],
                    "type": "onePerLine"
                }
            ]
        }
    }
}

Bonus question: how do I get the comments to appear before each parameter, like my original input?

@AlexHaxe AlexHaxe added unstable output changes with multiple formatting passes wrapping Incorrect or undesirable wrapping labels Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unstable output changes with multiple formatting passes wrapping Incorrect or undesirable wrapping
Projects
None yet
Development

No branches or pull requests

2 participants