Skip to content

Allow clippy-driver maybe? #1544

@yaahc

Description

@yaahc

The Dream

So I'm playing around and testing how hard it would be to integrate clippy-driver into cargo build and cargo check by exporting RUSTC=clippy-driver. For most crates this works fine and it builds and outputs just as if it were rustc but also you get clippy warnings.

The Problem

Turns out libc's build.rs file doesn't like clippy very much, and when you try to build you get the following error.

Screenshot from 2019-10-10 15-10-29

Which seems to be caused by this section of the build.rs file

https://github.com/rust-lang/libc/blob/master/build.rs#L87-L96

The Proposal

I'm not sure if this is crazy talk but I'd like it if libc could play nicely with clippy-driver. I know old versions will still miscompile so iunno how important helpful fixing this in libc is, but I figured I'd report it anyways

I'm not an expert but I think using rustc -vV instead of rustc --version might be better and more consistent with how the rest of the ecosystem gets version info from the compiler (thinking about cargo and sccache here). Here is the comparable outputs of those two invocations on rustc and clippy-driver

Screenshot from 2019-10-10 15-09-50

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions