docs.rs failed to build copypasteck-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
copypasteck
A basic rustc
lint plugin for checking for copy-paste
duplication. This will warn about if
and match
branches with
duplicated conditions or contents.
Example
# Cargo.toml
[]
= "example"
= "0.1.0"
= ["You <youremail@example.com>"]
[]
= "https://github.com/huonw/copypasteck"
// src/main.rs
extern crate copypasteck;
$ cargo build
Updating git repository `https://github.com/huonw/copypasteck`
Compiling copypasteck v0.1.0 (https://github.com/huonw/copypasteck)
Compiling example v0.1.0 (file:...)
.../src/main.rs:9:15: 9:20 warning: contents of `if` condition identical to previous condition; was there a copy-paste error?, #[warn(copy_paste)] on by default
.../src/main.rs:9 } else if a > 5 {
^~~~~
.../src/main.rs:7:8: 7:13 note: previous condition here
.../src/main.rs:7 if a > 5 {
^~~~~
License
This is distributed under the same terms as Rust itself, dual MIT and
Apache. See LICENSE-*
.