Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/bin/cargo/commands/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cargo::ops;
use cargo::util;

pub fn cli() -> App {
subcommand("clippy-preview")
subcommand("clippy")
.about("Checks a package to catch common mistakes and improve your Rust code.")
.arg(Arg::with_name("args").multiple(true))
.arg_package_spec(
Expand Down Expand Up @@ -63,13 +63,6 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
let mode = CompileMode::Check { test: false };
let mut compile_opts = args.compile_options(config, mode, Some(&ws))?;

if !config.cli_unstable().unstable_options {
return Err(failure::format_err!(
"`clippy-preview` is unstable, pass `-Z unstable-options` to enable it"
)
.into());
}

let mut wrapper = util::process(util::config::clippy_driver());

if let Some(clippy_args) = args.values_of("args") {
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn builtin_exec(cmd: &str) -> Option<fn(&mut Config, &ArgMatches<'_>) -> Cli
"build" => build::exec,
"check" => check::exec,
"clean" => clean::exec,
"clippy-preview" => clippy::exec,
"clippy" => clippy::exec,
"doc" => doc::exec,
"fetch" => fetch::exec,
"fix" => fix::exec,
Expand Down
84 changes: 84 additions & 0 deletions src/doc/man/cargo-clippy.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
= cargo-clippy(1)
:idprefix: cargo_clippy_
:doctype: manpage
:actionverb: Clippy

== NAME

cargo-clippy - Check the current package with clippy

== SYNOPSIS

`cargo clippy [_OPTIONS_]`

== DESCRIPTION

Check a local package and all of its local dependencies for common mistakes
with clippy.

== OPTIONS

=== Package Selection

include::options-packages.adoc[]

=== Target Selection

When no target selection options are given, `cargo clippy` will check all
binary and library targets of the selected packages. Binaries are skipped if
they have `required-features` that are missing.

include::options-targets.adoc[]

include::options-features.adoc[]

=== Compilation Options

include::options-target-triple.adoc[]

include::options-release.adoc[]

include::options-profile.adoc[]

=== Output Options

include::options-target-dir.adoc[]

=== Display Options

include::options-display.adoc[]

include::options-message-format.adoc[]

=== Manifest Options

include::options-manifest-path.adoc[]

include::options-locked.adoc[]

=== Common Options

include::options-common.adoc[]

=== Miscellaneous Options

include::options-jobs.adoc[]

include::section-profiles.adoc[]

include::section-environment.adoc[]

include::section-exit-status.adoc[]

== EXAMPLES

. Check the local package for common mistakes:

cargo clippy

. Check all targets, including unit tests:

cargo clippy --all-targets --profile=test

== SEE ALSO
man:cargo[1], man:cargo-build[1], man:cargo-check[1]
Loading