Skip to content

Update IndentStep to allow leading space on multi-line comments #1072

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

Merged
merged 5 commits into from
Jan 7, 2022

Conversation

vpavic
Copy link

@vpavic vpavic commented Jan 6, 2022

At present, indentWithTabs doesn't handle leading space on multi-line comments and reports errors on properly formatted code.

This commit updates IndentStep to add support for detecting multi-line comments and allowing a single leading space for such lines.

Closes #1070

Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start, almost there :)

vpavic added 2 commits January 6, 2022 19:35
At present, `indentWithTabs` doesn't handle leading space on multi-line comments and reports errors on properly formatted code.

This commit updates `IndentStep` to add support for detecting multi-line comments and allowing a single leading space for such lines.

Closes diffplug#1070
@nedtwigg nedtwigg disabled auto-merge January 6, 2022 19:10
@nedtwigg nedtwigg enabled auto-merge January 6, 2022 19:10
auto-merge was automatically disabled January 6, 2022 19:30

Head branch was pushed to by a user without write access

@vpavic
Copy link
Author

vpavic commented Jan 6, 2022

I pushed an additional commit that fixes the code style issue that caused the CI build to fail.

@nedtwigg note that I did run ./gradlew check locally and the build was successful - I'd expect this to cover all the project's check tasks.

@nedtwigg nedtwigg enabled auto-merge January 6, 2022 23:52
@nedtwigg nedtwigg merged commit 542546c into diffplug:main Jan 7, 2022
@vpavic vpavic deleted the gh-1070 branch January 7, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indentWithTabs ought to preserve C-style multiline comments
2 participants