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

style: reformat imports #219

Merged
merged 2 commits into from
Jun 12, 2023
Merged

style: reformat imports #219

merged 2 commits into from
Jun 12, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Jun 4, 2023

Order imports by std, external, crate and group them by crate

@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Merging #219 (485d2ee) into main (492af7a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #219   +/-   ##
=======================================
  Coverage   81.76%   81.76%           
=======================================
  Files          34       34           
  Lines        6591     6591           
=======================================
  Hits         5389     5389           
  Misses       1202     1202           
Impacted Files Coverage Δ
src/backend/crossterm.rs 0.00% <ø> (ø)
src/backend/mod.rs 33.33% <ø> (ø)
src/backend/termion.rs 28.04% <ø> (ø)
src/backend/termwiz.rs 0.00% <ø> (ø)
src/backend/test.rs 43.63% <ø> (ø)
src/buffer.rs 93.30% <ø> (ø)
src/layout.rs 85.25% <ø> (ø)
src/style.rs 85.33% <ø> (ø)
src/terminal.rs 56.19% <ø> (ø)
src/text.rs 69.74% <ø> (ø)
... and 14 more

@joshka joshka requested review from mindoodoo and sayanarijit and removed request for mindoodoo June 4, 2023 01:01
@sayanarijit
Copy link
Member

Looks like it will create merge conflict with other PRs. LGTM, otherwise.

@joshka
Copy link
Member Author

joshka commented Jun 4, 2023

Yup. I figured that a rebase would be necessary depending on which PR goes first regardless.

@sayanarijit
Copy link
Member

I guess it's easy to force rebase this pr than other prs, so let's wait for a good opportunity.

@joshka
Copy link
Member Author

joshka commented Jun 4, 2023

I'm not sure I'd worry too much about waiting - there's always going to be some amount of outstanding PRs, so there's not really a good or a bad time to merge cross repo type stuff.

This contains a rustfmt.toml change that make all the changes automatic.

There are 2 ways to make the pain of rebasing on top of this pain free (assuming this change gets merged before some other PR):

  1. If you're squashing the PR, git checkout main -- rustfmt.toml; cargo fmt; git add src; git commit -m 'style: reformat' then squash and rebase.
  2. More difficult: rebase and sort out the conflcts then cargo fmt.

Option 1 would be mostly automatic.

Order imports by std, external, crate and group them by crate
@joshka
Copy link
Member Author

joshka commented Jun 5, 2023

Rebased and fixed conflict in rustfmt.toml

@joshka joshka enabled auto-merge June 11, 2023 21:04
@joshka joshka added this pull request to the merge queue Jun 12, 2023
Merged via the queue into ratatui-org:main with commit f7af8a3 Jun 12, 2023
9 of 10 checks passed
samyosm pushed a commit to samyosm/ratatui that referenced this pull request Jun 18, 2023
Order imports by std, external, crate and group them by crate
@joshka joshka deleted the style-imports branch July 9, 2023 02:17
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.

None yet

2 participants