-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix issue where formatter is not always enabled on save in intellij #1110
Fix issue where formatter is not always enabled on save in intellij #1110
Conversation
Generate changelog in
|
|
||
def myAllFileTypesSelectedAlreadySet = matchChild(onSaveOptions, 'option', [name: 'myAllFileTypesSelected']) | ||
.map { Boolean.parseBoolean(it.attribute('value')) } | ||
.orElse(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the crux of the bug. If myAllFileTypesSelected
did not already exist, we would think it is already set to true and make no further changes, despite the default being false.
…led' of github.com:palantir/palantir-java-format into callumr/fix-issue-where-formatter-is-sometimes-not-enabled
@@ -183,8 +177,7 @@ class ConfigureJavaFormatterXmlTest extends Specification { | |||
def node = new XmlParser().parseText """ | |||
<root> | |||
<component name="${action}OnSaveOptions"> | |||
<option name="myRunOnSave" value="true"/> | |||
<!-- if myAllFileTypesSelected does not exist, it defaults to true --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lies
👍 |
Released 2.48.0 |
Before this PR
We've had sporadic reports of the formatter not being enabled on save in intellij. I ran into this yesterday and today.
After this PR
==COMMIT_MSG==
The formatter should now always been enabled on save in intellij.
==COMMIT_MSG==
Possible downsides?