Skip to content

Default lints should correspond to rustc #16628

Open
@dhardy

Description

Summary

I would expect that rust-analyzer, with default settings, would report the same lints (warnings, errors, etc.) as rustc

Details

Currently this is not the case; for example I also see messages about these:

  • inactive-code — this may have a special purpose in some editors? In Kate it's more annoying than useful, but that may be just Kate.
  • remove-unnecessary-else — nearest equivalent is Clippy's redundant_else?

The default enabled lints also do not correspond to Clippy's default lints (there is a note in the manual about enabling Clippy by default).

Motivation

I would (naively) expect that a project which is clean (reports no lints) under cargo check is also clean under rust-analyzer, and vice-versa. This makes it easier for developers using different tools to collaborate on a project.

Further motivation: the rust-analyzer project should probably not be responsible for choosing which lints are enabled by default (especially when both rustc and clippy already do this).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingC-supportCategory: support questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions