-
Notifications
You must be signed in to change notification settings - Fork 521
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
chore: refine the hg-style.xml specification #2457
Merged
VGalaxies
merged 5 commits into
apache:master
from
returnToInnocence:hg-style-refine-2435
Feb 27, 2024
+30
−3
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
35e244a
refine the hg-style.xml #2435 no indents change
returnToInnocence 02198ed
Supplement the hg-style.xml
returnToInnocence 6bf3a7d
Update .editorconfig to Solve the reformat java code single line inde…
returnToInnocence 4794c29
Restore the empty tag space
returnToInnocence 1fde1d0
Restores the`.editorconfig` in master and adds continuation_indent_size
returnToInnocence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" /> | ||
<option name="SOFT_MARGINS" value="100" /> | ||
<JavaCodeStyleSettings> | ||
<option name="JD_P_AT_EMPTY_LINES" value="true" /> | ||
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" /> | ||
<option name="ANNOTATION_PARAMETER_WRAP" value="1" /> | ||
<option name="ALIGN_MULTILINE_ANNOTATION_PARAMETERS" value="true" /> | ||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" /> | ||
|
@@ -42,9 +44,6 @@ | |
</value> | ||
</option> | ||
</JavaCodeStyleSettings> | ||
<XML> | ||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | ||
</XML> | ||
<codeStyleSettings language="JAVA"> | ||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" /> | ||
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" /> | ||
|
@@ -74,8 +73,33 @@ | |
<option name="WRAP_LONG_LINES" value="true" /> | ||
<option name="PARAMETER_ANNOTATION_WRAP" value="1" /> | ||
<option name="ENUM_CONSTANTS_WRAP" value="2" /> | ||
<option name="WRAP_ON_TYPING" value="1" /> | ||
<option name="SOFT_MARGINS" value="100" /> | ||
<option name="RIGHT_MARGIN" value="100" /> | ||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" /> | ||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> | ||
<option name="KEEP_BLANK_LINES_BETWEEN_PACKAGE_DECLARATION_AND_HEADER" value="1" /> | ||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" /> | ||
<option name="BLANK_LINES_AROUND_CLASS" value="1" /> | ||
<indentOptions> | ||
<option name="SMART_TABS" value="true" /> | ||
</indentOptions> | ||
</codeStyleSettings> | ||
<codeStyleSettings language="XML"> | ||
<option name="RIGHT_MARGIN" value="120" /> | ||
<option name="WRAP_ON_TYPING" value="1" /> | ||
<option name="SOFT_MARGINS" value="120" /> | ||
</codeStyleSettings> | ||
Comment on lines
+88
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good, set max 120 chars for |
||
<XML> | ||
<option name="XML_TEXT_WRAP" value="0" /> | ||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | ||
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" /> | ||
</XML> | ||
<Properties> | ||
<option name="KEEP_BLANK_LINES" value="true" /> | ||
</Properties> | ||
<codeStyleSettings language="yaml"> | ||
<option name="SPACE_WITHIN_BRACKETS" value="false" /> | ||
<option name="SPACE_WITHIN_BRACES" value="false" /> | ||
</codeStyleSettings> | ||
</code_scheme> |
Oops, something went wrong.
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.
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.
not sure why delete this code?
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.
Sorry sir, I didn't describe this clearly in main change
The reason for this change is that we encountered a problem while formatting the java code,
The intended effect of format is to automatically wrap and indent a line when it exceeds the maximum length of 100, which is a special case where the number of indented Spaces is eight
If the changes in the.editorConfig do not change, the indentation will change to 4, even though the code style has been set to 8
Before modification
After modification
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 sorry, but I've found a new solution that doesn't require deleting the above, but instead enables a special option in
.editorconfig
for indenting more than the maximum line wrap of a single characterI'll make a new commit, which will undo my changes to the
.editorconfig
section and add the options aboveMainly refer to the configuration of the spring-cloud project