OpenSK
OpenSK copied to clipboard
Enable Rustfmt's wrap_comments option?
As pointed out in https://github.com/google/OpenSK/pull/165#discussion_r499035911, we currently allow comments that exceed the maximum line length normally allowed by Rustfmt.
We could enable the wrap_comments
option in rustfmt.toml
to make sure the comments don't exceed this maximum length, and are wrapped properly. This however requires a few things.
- The
wrap_comments
option is currently unstable (rust-lang/rustfmt#3347), so we have to decide if we want to commit to using it. - Enabling it will require some manual fixing of a few badly formatted comments, e.g. including ASCII art.
As indicated, I expected this to automatically checked. No strong opinion however, where are ASCII art examples that would need refactoring?
As indicated, I expected this to automatically checked. No strong opinion however, where are ASCII art examples that would need refactoring?
It'd be easier to have an exhaustive list while reviewing code, but for a start src/ctap/ctap1.rs
has some tables (not sure if it should be best described as "ASCII art" or "markdown").
Just wanted to know if you have an intuition about how much we have to change. But it seems like our code would be nicer with correct length comments? But I'd say it's low priority.