Skip to content

Commit b4736b4

Browse files
committed
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
1 parent ec5e9c7 commit b4736b4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.gitattributes

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
2-
31
* text=auto eol=lf
4-
*.rs rust
2+
*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
53
*.fixed linguist-language=Rust

0 commit comments

Comments
 (0)