Skip to content

Commit

Permalink
Auto merge of rust-lang#6756 - smoelius:clippy_utils, r=flip1995,obi-obk
Browse files Browse the repository at this point in the history
Factor out `clippy_utils` crate

As discussed in rust-lang/rust-clippy#6746, this PR factors out `clippy_lints::utils` as its own crate, `clippy_utils` .

This change will allow `clippy_utils` to be used in lints outside of Clippy.

There is no plan to publish this crate on `crates.io` (see rust-lang/rust-clippy#6746 (comment)). Dependent crates should obtain it from GitHub.

changelog: Factor out `clippy_utils` so it can be used by external tools (not published)
  • Loading branch information
bors committed Feb 24, 2021
2 parents 045d3f3 + ab7381f commit 489c4f0
Show file tree
Hide file tree
Showing 29 changed files with 2,529 additions and 2,463 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ out
*Cargo.lock
/target
/clippy_lints/target
/clippy_utils/target
/clippy_workspace_tests/target
/clippy_dev/target
/rustc_tools_util/target
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ edition = "2018"

[dependencies]
cargo_metadata = "0.12"
clippy_utils = { path = "../clippy_utils" }
if_chain = "1.0.0"
itertools = "0.9"
pulldown-cmark = { version = "0.8", default-features = false }
Expand All @@ -38,4 +39,4 @@ syn = { version = "1", features = ["full"] }
[features]
deny-warnings = []
# build clippy with internal lints enabled, off by default
internal-lints = []
internal-lints = ["clippy_utils/internal-lints"]
Loading

0 comments on commit 489c4f0

Please sign in to comment.