Project

General

Profile

Actions

Task #3836

open
RF JI

Formatting rust code

Task #3836: Formatting rust code

Added by Roland Fischer over 5 years ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

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.


Related issues 1 (1 open0 closed)

Related to Suricata - Task #3166: src code file reorgIn ProgressJason IshActions

RF Updated by Roland Fischer over 5 years ago Actions #1

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

RF Updated by Roland Fischer over 5 years ago Actions #2

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.

PA Updated by Philippe Antoine almost 3 years ago Actions #4

  • Target version set to 8.0.0-beta1

PA Updated by Philippe Antoine almost 3 years ago Actions #5

  • Assignee set to OISF Dev

PA Updated by Philippe Antoine almost 3 years ago Actions #6

  • Assignee changed from OISF Dev to Philippe Antoine

PA Updated by Philippe Antoine over 2 years ago Actions #7

  • Status changed from New to In Review

PA Updated by Philippe Antoine about 2 years ago Actions #8

https://github.com/OISF/suricata/pull/10303 is the latest version, easy to recreate the formatting commit

JI Updated by Jason Ish about 2 years ago Actions #9

  • Status changed from In Review to In Progress
  • Assignee changed from Philippe Antoine to Jason Ish

Taking over, and relating to the source file re-org, as we'll do it all together.

JI Updated by Jason Ish about 2 years ago Actions #10

  • Related to Task #3166: src code file reorg added

VJ Updated by Victor Julien about 1 year ago Actions #11

  • Target version changed from 8.0.0-beta1 to 9.0.0-beta1
Actions

Also available in: PDF Atom