Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jan 27, 2019
1 parent e3270c6 commit e9e0a7e
Show file tree
Hide file tree
Showing 129 changed files with 588 additions and 4 deletions.
4 changes: 4 additions & 0 deletions clippy_lints/src/approx_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(APPROX_CONSTANT)
}

fn name(&self) -> &'static str {
"ApproxConstant"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ impl LintPass for Arithmetic {
fn get_lints(&self) -> LintArray {
lint_array!(INTEGER_ARITHMETIC, FLOAT_ARITHMETIC)
}

fn name(&self) -> &'static str {
"Arithmetic"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/assertions_on_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ impl LintPass for AssertionsOnConstants {
fn get_lints(&self) -> LintArray {
lint_array![ASSERTIONS_ON_CONSTANTS]
}

fn name(&self) -> &'static str {
"AssertionsOnConstants"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/assign_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ impl LintPass for AssignOps {
fn get_lints(&self) -> LintArray {
lint_array!(ASSIGN_OP_PATTERN, MISREFACTORED_ASSIGN_OP)
}

fn name(&self) -> &'static str {
"AssignOps"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
Expand Down
8 changes: 8 additions & 0 deletions clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ impl LintPass for AttrPass {
UNKNOWN_CLIPPY_LINTS,
)
}

fn name(&self) -> &'static str {
"Attributes"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
Expand Down Expand Up @@ -500,6 +504,10 @@ impl LintPass for CfgAttrPass {
fn get_lints(&self) -> LintArray {
lint_array!(DEPRECATED_CFG_ATTR,)
}

fn name(&self) -> &'static str {
"DeprecatedCfgAttribute"
}
}

impl EarlyLintPass for CfgAttrPass {
Expand Down
3 changes: 3 additions & 0 deletions clippy_lints/src/bit_mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ impl LintPass for BitMask {
fn get_lints(&self) -> LintArray {
lint_array!(BAD_BIT_MASK, INEFFECTIVE_BIT_MASK, VERBOSE_BIT_MASK)
}
fn name(&self) -> &'static str {
"BitMask"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {
Expand Down
3 changes: 3 additions & 0 deletions clippy_lints/src/blacklisted_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ impl LintPass for BlackListedName {
fn get_lints(&self) -> LintArray {
lint_array!(BLACKLISTED_NAME)
}
fn name(&self) -> &'static str {
"BlacklistedName"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlackListedName {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/block_in_if_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ impl LintPass for BlockInIfCondition {
fn get_lints(&self) -> LintArray {
lint_array!(BLOCK_IN_IF_CONDITION_EXPR, BLOCK_IN_IF_CONDITION_STMT)
}

fn name(&self) -> &'static str {
"BlockInIfCondition"
}
}

struct ExVisitor<'a, 'tcx: 'a> {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/booleans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ impl LintPass for NonminimalBool {
fn get_lints(&self) -> LintArray {
lint_array!(NONMINIMAL_BOOL, LOGIC_BUG)
}

fn name(&self) -> &'static str {
"NonminimalBool"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/bytecount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ impl LintPass for ByteCount {
fn get_lints(&self) -> LintArray {
lint_array!(NAIVE_BYTECOUNT)
}

fn name(&self) -> &'static str {
"ByteCount"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ByteCount {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/cargo_common_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(CARGO_COMMON_METADATA)
}

fn name(&self) -> &'static str {
"CargoCommonMetadata"
}
}

impl EarlyLintPass for Pass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/collapsible_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ impl LintPass for CollapsibleIf {
fn get_lints(&self) -> LintArray {
lint_array!(COLLAPSIBLE_IF)
}

fn name(&self) -> &'static str {
"CollapsibleIf"
}
}

impl EarlyLintPass for CollapsibleIf {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/const_static_lifetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ impl LintPass for StaticConst {
fn get_lints(&self) -> LintArray {
lint_array!(CONST_STATIC_LIFETIME)
}

fn name(&self) -> &'static str {
"StaticConst"
}
}

impl StaticConst {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/copies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ impl LintPass for CopyAndPaste {
fn get_lints(&self) -> LintArray {
lint_array![IFS_SAME_COND, IF_SAME_THEN_ELSE, MATCH_SAME_ARMS]
}

fn name(&self) -> &'static str {
"CopyAndPaste"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyAndPaste {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/copy_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ impl LintPass for CopyIterator {
fn get_lints(&self) -> LintArray {
lint_array![COPY_ITERATOR]
}

fn name(&self) -> &'static str {
"CopyIterator"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/cyclomatic_complexity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ impl LintPass for CyclomaticComplexity {
fn get_lints(&self) -> LintArray {
lint_array!(CYCLOMATIC_COMPLEXITY)
}

fn name(&self) -> &'static str {
"CyclomaticComplexity"
}
}

impl CyclomaticComplexity {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/default_trait_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ impl LintPass for DefaultTraitAccess {
fn get_lints(&self) -> LintArray {
lint_array!(DEFAULT_TRAIT_ACCESS)
}

fn name(&self) -> &'static str {
"DefaultTraitAccess"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DefaultTraitAccess {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ impl LintPass for Derive {
fn get_lints(&self) -> LintArray {
lint_array!(EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ)
}

fn name(&self) -> &'static str {
"Derive"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ impl LintPass for Doc {
fn get_lints(&self) -> LintArray {
lint_array![DOC_MARKDOWN]
}

fn name(&self) -> &'static str {
"DocMarkdown"
}
}

impl EarlyLintPass for Doc {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/double_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(DOUBLE_COMPARISONS)
}

fn name(&self) -> &'static str {
"DoubleComparisons"
}
}

impl<'a, 'tcx> Pass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/double_parens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ impl LintPass for DoubleParens {
fn get_lints(&self) -> LintArray {
lint_array!(DOUBLE_PARENS)
}

fn name(&self) -> &'static str {
"DoubleParens"
}
}

impl EarlyLintPass for DoubleParens {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/drop_forget_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY)
}

fn name(&self) -> &'static str {
"DropForgetRef"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/duration_subsec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ impl LintPass for DurationSubsec {
fn get_lints(&self) -> LintArray {
lint_array!(DURATION_SUBSEC)
}

fn name(&self) -> &'static str {
"DurationSubsec"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DurationSubsec {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/else_if_without_else.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ impl LintPass for ElseIfWithoutElse {
fn get_lints(&self) -> LintArray {
lint_array!(ELSE_IF_WITHOUT_ELSE)
}

fn name(&self) -> &'static str {
"ElseIfWithoutElse"
}
}

impl EarlyLintPass for ElseIfWithoutElse {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/empty_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ impl LintPass for EmptyEnum {
fn get_lints(&self) -> LintArray {
lint_array!(EMPTY_ENUM)
}

fn name(&self) -> &'static str {
"EmptyEnum"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ impl LintPass for HashMapLint {
fn get_lints(&self) -> LintArray {
lint_array!(MAP_ENTRY)
}

fn name(&self) -> &'static str {
"HashMap"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HashMapLint {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/enum_clike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ impl LintPass for UnportableVariant {
fn get_lints(&self) -> LintArray {
lint_array!(ENUM_CLIKE_UNPORTABLE_VARIANT)
}

fn name(&self) -> &'static str {
"UnportableVariant"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/enum_glob_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ impl LintPass for EnumGlobUse {
fn get_lints(&self) -> LintArray {
lint_array!(ENUM_GLOB_USE)
}

fn name(&self) -> &'static str {
"EnumGlobUse"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/enum_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ impl LintPass for EnumVariantNames {
MODULE_INCEPTION
)
}

fn name(&self) -> &'static str {
"EnumVariantNames"
}
}

fn var2str(var: &Variant) -> LocalInternedString {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/eq_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ impl LintPass for EqOp {
fn get_lints(&self) -> LintArray {
lint_array!(EQ_OP, OP_REF)
}

fn name(&self) -> &'static str {
"EqOp"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/erasing_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ impl LintPass for ErasingOp {
fn get_lints(&self) -> LintArray {
lint_array!(ERASING_OP)
}

fn name(&self) -> &'static str {
"ErasingOp"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ErasingOp {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(BOXED_LOCAL)
}

fn name(&self) -> &'static str {
"BoxedLocal"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/eta_reduction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ impl LintPass for EtaPass {
fn get_lints(&self) -> LintArray {
lint_array!(REDUNDANT_CLOSURE)
}

fn name(&self) -> &'static str {
"EtaReduction"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/eval_order_dependence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ impl LintPass for EvalOrderDependence {
fn get_lints(&self) -> LintArray {
lint_array!(EVAL_ORDER_DEPENDENCE, DIVERGING_SUB_EXPRESSION)
}

fn name(&self) -> &'static str {
"EvalOrderDependence"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/src/excessive_precision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ impl LintPass for ExcessivePrecision {
fn get_lints(&self) -> LintArray {
lint_array!(EXCESSIVE_PRECISION)
}

fn name(&self) -> &'static str {
"ExcessivePrecision"
}
}

impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExcessivePrecision {
Expand Down
Loading

0 comments on commit e9e0a7e

Please sign in to comment.