Task #3836
openFormatting rust code
Description
Side-discussion on clang-formatting code, see #3736
We shall rustfmt rust code.
We shall add a rustfmt check to the build similar to the formatting-check with clang-format that checks a branch' rust changes for correct formatting.
Updated by Roland Fischer over 4 years ago
clang-format checks only work on actual code changes using git-clang-format.
It does not seem that rustfmt supports that functionality yet (or that there is an equivalent a la git-rustfmt).
@jasonish:
Unfortunately I don't think rustfmt is advanced enough in this area. From what I can tell its the complete file or nothing, and being able to just look at the changed lines is still an open issue:
rust-lang/rustfmt#4103
rust-lang/rustfmt#1324
Updated by Roland Fischer over 4 years ago
Note, if all of the rust code was already properly formatted, one could just run rustfmt over the whole branch instead of just the changes.
However, that begs the question similar to the C code. Do you want to reformat all rust code in one go? Would probably require some discussion.
Updated by Philippe Antoine over 1 year ago
https://github.com/OISF/suricata/pull/9044 is a first step
Updated by Philippe Antoine over 1 year ago
- Assignee changed from OISF Dev to Philippe Antoine
Updated by Philippe Antoine 12 months ago
- Status changed from New to In Review
Updated by Philippe Antoine 9 months ago
https://github.com/OISF/suricata/pull/10303 is the latest version, easy to recreate the formatting commit
Updated by Jason Ish 9 months ago
- Related to Task #3166: src code file reorg added