Skip to content

chore: add rustfmt import rules#78

Closed
gibbz00 wants to merge 1 commit into
djc:mainfrom
gibbz00:rustfmt_config
Closed

chore: add rustfmt import rules#78
gibbz00 wants to merge 1 commit into
djc:mainfrom
gibbz00:rustfmt_config

Conversation

@gibbz00

@gibbz00 gibbz00 commented Oct 24, 2024

Copy link
Copy Markdown
Contributor

In response to: #77 (comment)

@gibbz00

gibbz00 commented Oct 24, 2024

Copy link
Copy Markdown
Contributor Author

I do prefer imports_granularity = "Crate", module seemed to be used slightly more.

@djc

djc commented Oct 25, 2024

Copy link
Copy Markdown
Owner

I don't think this is much of an improvement.

  • I usually stable cargo fmt, and I think most people do, so the configuration will just be ineffective and add a bunch of warnings, and will not be checked in CI.
  • While technically instant_xml is external in its own integration tests, that does not feel conceptually correct to me, making most of the changes in this PR easier to technically enforce but also conceptually kinda wrong.
  • As such, I'd prefer a PR that just takes the other changes here without adding configuration, relying more on reviewing to catch occasional lapses.

Code is for people -- tooling can help but IMO it is unavoidable that some stylistic aspects will remain eeasier to enforce by humans. If you prefer I can add a CONTRIBUTING.md with extensive style policy (I would pretty much copy rustls' CONTRIBUTING.md which I mostly wrote).

@djc

djc commented Nov 14, 2024

Copy link
Copy Markdown
Owner

Given the lack of follow-up, assuming you've forked this crate, so going to close this for now.

@djc djc closed this Nov 14, 2024
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