]> git.lizzy.rs Git - rust.git/blob - src/lintlist/lint.rs
Merge remote-tracking branch 'upstream/beta' into backport_remerge
[rust.git] / src / lintlist / lint.rs
1 /// Lint data parsed from the Clippy source code.
2 #[derive(Clone, PartialEq, Debug)]
3 pub struct Lint {
4     pub name: &'static str,
5     pub group: &'static str,
6     pub desc: &'static str,
7     pub deprecation: Option<&'static str>,
8     pub module: &'static str,
9 }
10
11 #[derive(PartialOrd, PartialEq, Ord, Eq)]
12 pub enum Level {
13     Allow,
14     Warn,
15     Deny,
16 }
17
18 pub const LINT_LEVELS: [(&str, Level); 8] = [
19     ("correctness", Level::Deny),
20     ("style", Level::Warn),
21     ("complexity", Level::Warn),
22     ("perf", Level::Warn),
23     ("restriction", Level::Allow),
24     ("pedantic", Level::Allow),
25     ("nursery", Level::Allow),
26     ("cargo", Level::Allow),
27 ];