rust-lang / rust-lang/rust-clippy

Migrate to `span_clippy_lint`

Open
#7,797 4 comments 0 reactions 1 assignee View on GitHub

@xFrednet is already working on this.

Since Jul 21, 2024.

C-tracking-issue G-performance-project
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

We have a handful of utils for emitting lints: span_lint, span_lint_and_help, etc. We'd like to replace these with one new util named span_clippy_lint. It was already implemented in #7668, but not yet merged.

Goals

  • Be more consistent with rustc
  • Potentially improve perf since allowed lints stop before computing output messages
  • Enable trimmed paths (#7798)

Question: Should we use .emit() like rustc, or use Drop to emit automatically?

Steps

  • Add span_clippy_lint from #7668 and patch the metadata collector to work with it
  • Change all span_lint_* calls to span_clippy_lint
  • divide this into smaller parts?
  • Remove span_lint* utils and metadata collector support

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.