Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clippy and rustfmt #102

Closed
mo8it opened this issue May 7, 2024 · 2 comments
Closed

Clippy and rustfmt #102

mo8it opened this issue May 7, 2024 · 2 comments

Comments

@mo8it
Copy link
Contributor

mo8it commented May 7, 2024

I was surprised that this crate isn't using Clippy (many pending lints) and isn't formatted using rustfmt. This makes reading the code and contributing harder, at least for me. Are you open for a PR to use both?

@SergioBenitez
Copy link
Owner

I was surprised that this crate isn't using Clippy (many pending lints)

We do use clippy, we just don't fix every lint because not all of them are strict improvements. Instead of peppering the codebase with allow(clippy) annotations, we either declare them in the [lints.clippy] Cargo.toml file or leave them be.

and isn't formatted using rustfmt. This makes reading the code and contributing harder, at least for me.

As of the last time I checked, rustfmt is still unable to format a bunch of reasonable code (like things in macro invocations) in a reasonable manner. Nevertheless, we do have code style guidelines that we rather strictly enforce. Which code are you finding hard to read?

Are you open for a PR to use both?

We have tried rustfmt many times and each time has ended poorly. As a result we committed a rustfmt file that simply disables rustfmt. If the state of rustfmt has changed significantly then I'm happy to try again, but we would want the most conservative settings that result in the smallest diff.

As for clippy: as I said we do use clippy, but if you have ways to improve our use of want to submit fixes that clippy identified, they are absolutely welcome!

@SergioBenitez
Copy link
Owner

Closing as there's nothing directly actionable. Happy to field PRs as indicated above.

@SergioBenitez SergioBenitez closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants