-
Notifications
You must be signed in to change notification settings - Fork 134
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
update spotless eclipse formatting rules #1582
Conversation
Generate changelog in
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="49"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="49"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="0"/> | ||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/> |
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.
These are the new lines
It's not clear why this differed given spotlessApply just runs the eclipse formatter directly. Perhaps slightly different versions with different default values for prefs that we didn't include in the configuration? |
@rzpt I wonder if the changelog issue has something to do with not having any email address configured for git? Probably worth a ticket against the robot if that fixes it!
|
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.
lgtm
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/> | ||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> | ||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> | ||
<profile kind="CodeFormatterProfile" name="PalantirStyle" version="20"> |
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 a little odd, should the previous line also be updated to version="20"
?
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.
I'm not sure what you mean. Which previous line?
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.
The outer xml element has version=18
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.
Oh, I see. I can try exporting again to see what happens.
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.
I assume that the defaults for spotless do not match the defaults for eclipse. I'm not sure why they'd do that...
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/> | ||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> | ||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> | ||
<profile kind="CodeFormatterProfile" name="PalantirStyle" version="20"> |
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.
I'm not sure what you mean. Which previous line?
Ack, if it works I'm not too worried either way, it just struck me as odd. |
Released 3.59.1 |
Before this PR
The eclipse rules did not match how spotless would format files for line wrapped asserts.
After this PR
==COMMIT_MSG==
Eclipse formatting rules now match the spotless format for line wrapped asserts.
==COMMIT_MSG==
Possible downsides?
None. There may be other rules that are out of sync that are not fixed by this update.