Merge pull request #3301 from sigustin/patch-1

Specify which categories are enabled by default
This commit is contained in:
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer 2018-10-12 13:16:34 +02:00 committed by GitHub
commit 7557269db2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,15 @@ We have a bunch of lint categories to allow you to choose how much Clippy is sup
More to come, please [file an issue](https://github.com/rust-lang-nursery/rust-clippy/issues) if you have ideas!
Only the following of those categories are enabled by default:
* `clippy::style`
* `clippy::correctness`
* `clippy::complexity`
* `clippy::perf`
Other categories need to be enabled in order for their lints to be executed.
Table of contents:
* [Usage instructions](#usage)

View file

@ -46,6 +46,8 @@ extern crate syntax_pos;
use toml;
// Currently, categories "style", "correctness", "complexity" and "perf" are enabled by default,
// as said in the README.md of this repository. If this changes, please update README.md.
macro_rules! declare_clippy_lint {
{ pub $name:tt, style, $description:tt } => {
declare_tool_lint! { pub clippy::$name, Warn, $description, report_in_external_macro: true }