Skip to content
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

Allow for nested keep-sorted blocks. #14

Merged
merged 6 commits into from
Jan 16, 2024
Merged

Allow for nested keep-sorted blocks. #14

merged 6 commits into from
Jan 16, 2024

Conversation

JeffFaer
Copy link
Collaborator

Note: There's a couple different commits in this PR. The first commit contains a golden test that shows the behavior of keep-sorted before this PR.

@JeffFaer

This comment was marked as duplicate.

KatrinaHoffert

This comment was marked as resolved.

keepsorted/block.go Show resolved Hide resolved
keepsorted/block.go Show resolved Hide resolved
KatrinaHoffert
KatrinaHoffert previously approved these changes Jan 3, 2024
keepsorted/block.go Show resolved Hide resolved
keepsorted/keep_sorted_test.go Outdated Show resolved Hide resolved
keepsorted/keep_sorted_test.go Show resolved Hide resolved
Base automatically changed from jfaer/hanging_newline to main January 12, 2024 16:59
@JeffFaer JeffFaer dismissed KatrinaHoffert’s stale review January 12, 2024 16:59

The base branch was changed.

JeffFaer added a commit that referenced this pull request Jan 12, 2024
…s the proper indent. (#15)

This is necessary for a nested keep-sorted test case (#14) that uses
group=yes to capture the nested keep-sorted blocks as well as
newline_separated=yes in one of those nested blocks.

Without this, the newlines that the nested block introduces break up the
indent-based grouping, resulting in pretty bad behavior.
@JeffFaer JeffFaer merged commit 59afe99 into main Jan 16, 2024
5 checks passed
@JeffFaer JeffFaer deleted the jfaer/nested branch January 16, 2024 17:29
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.

2 participants