Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Draft: Run initial JuliaFormatter with BlueStyle #197
Draft: Run initial JuliaFormatter with BlueStyle #197
Changes from all commits
0e908df
3e4c79e
50f873a
d95ed7b
15a3bd2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 seems like the only particularly odd/unfortunate change
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 think this is something we should add to the style guide (to prefer what previously existed).
The placement of the rest of the text and the closing triple quote relative to the opening triple quote makes no difference to the content of the string.
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.
yes please!
JuliaDiff/BlueStyle#60
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.
JuliaDiff/BlueStyle#71
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.
Interestingly, the formatter seems to have been confused here by where the opening triple quotes
By BlueStyle, this should be
And JuliaFormatter (v0.9) would leave that as is
But the actual code here right now has the opening triple-quot on the line below i.e. it is
which seems to confuse the formatter (?), which changes this to
Perhaps @domluna knows if this is intended behaviour (which just needs overloading for BlueStyle) or if something funky is going on?
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 intended, the idea being that the indentation of the string changes based on where the tripe quote opener is moved. This allows it to be moved around intact.
In this case (TYPEDEF) is 4 spaces in behind the opening quote so when the quote is moved up a line, (TYPEDEF) follows to be 4 spaces behind the new position.
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.
okay, cool - thanks - makes sense! BlueStyle prefers something different, so in time it'd be nice to support that for
BlueStyle()
domluna/JuliaFormatter.jl#283 (comment)