Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git attribute macros not allowed in submodules #5382

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

richkadel
Copy link
Contributor

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

Thank you for making Clippy better!

We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
changelog entry as none. Otherwise, please write a short comment
explaining your change.

If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.

If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.

  • Followed lint naming conventions
  • Added passing UI tests (including committed .stderr file)
  • cargo test passes locally
  • Executed cargo dev update_lints
  • Added lint documentation
  • Run cargo dev fmt

Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.

Delete this line and everything above before opening your PR.


changelog: none

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
@phansch
Copy link
Member

phansch commented Mar 29, 2020

@bors r+

thanks!

@bors
Copy link
Contributor

bors commented Mar 29, 2020

📌 Commit b4736b4 has been approved by phansch

@bors
Copy link
Contributor

bors commented Mar 29, 2020

⌛ Testing commit b4736b4 with merge d3c40a1...

@bors
Copy link
Contributor

bors commented Mar 29, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing d3c40a1 to master...

@bors bors merged commit d3c40a1 into rust-lang:master Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants