Skip to content

cargo clippy does not process build scripts #2802

Open
@FaultyRAM

Description

@FaultyRAM

cargo clippy doesn't do any extra handling of build scripts beyond what cargo check does. For example, this code will trigger an unknown_lints warning when using cargo clippy:

#![forbid(print_literal)]

fn main() {
    println!("{}", "");
}

Built-in lints still work; adding a #![forbid(missing_docs)] to the above snippet fails the build as expected. clippy-as-a-plugin also works:

#![feature(plugin)]
#![plugin(clippy)]
#![forbid(print_literal)]

fn main() {
    println!("{}", "");
}

I'm not actually sure whether clippy or cargo is at fault here, but since the plugin interface is about to go I figured it might be more prudent to report here first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions