rust: add `.rustfmt.toml`
authorMiguel Ojeda <ojeda@kernel.org>
Thu, 4 Aug 2022 10:54:09 +0000 (12:54 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 28 Sep 2022 07:02:20 +0000 (09:02 +0200)
This is the configuration file for the `rustfmt` tool.

`rustfmt` is a tool for formatting Rust code according to style guidelines.
It is very commonly used across Rust projects.

The default configuration options are used.

Reviewed-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
.gitignore
.rustfmt.toml [new file with mode: 0644]

index 80989914c97d5de0cb4eed3e4bf42e0b91a6b3a6..97e085d613a2717265380b12a3db189d65a33fa3 100644 (file)
@@ -97,6 +97,7 @@ modules.order
 !.gitattributes
 !.gitignore
 !.mailmap
+!.rustfmt.toml
 
 #
 # Generated include files
diff --git a/.rustfmt.toml b/.rustfmt.toml
new file mode 100644 (file)
index 0000000..3de5cc4
--- /dev/null
@@ -0,0 +1,12 @@
+edition = "2021"
+newline_style = "Unix"
+
+# Unstable options that help catching some mistakes in formatting and that we may want to enable
+# when they become stable.
+#
+# They are kept here since they are useful to run from time to time.
+#format_code_in_doc_comments = true
+#reorder_impl_items = true
+#comment_width = 100
+#wrap_comments = true
+#normalize_comments = true