From b4736b4d35313060a956470dd1e970376f9a0a1a Mon Sep 17 00:00:00 2001 From: Rich Kadel Date: Sun, 29 Mar 2020 06:58:37 -0700 Subject: [PATCH] git attribute macros not allowed in submodules This change simply moves the `rust` macro definition directly into the attributes for `*.rs` files. git commands that recurse from the rust toplevel tree into submodules produce errors in clippy due to the fact that: "Custom macro attributes can be defined only in top-level gitattributes files" For example, from the toplevel `rust` directory in a rustc development build, try: $ git grep "search string" --recurse-submodules Embedded within the actual results is the error message: [attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4 not allowed: src/tools/clippy/.gitattributes:1 --- .gitattributes | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 796afdbde90..90cf33053c7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,3 @@ -[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4 - * text=auto eol=lf -*.rs rust +*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4 *.fixed linguist-language=Rust