rust-clippy/src/lib.rs

64 lines
1.4 KiB
Rust
Raw Normal View History

// error-pattern:cargo-clippy
2016-02-22 13:25:51 +00:00
#![feature(type_macros)]
2015-01-10 06:26:58 +00:00
#![feature(plugin_registrar, box_syntax)]
#![feature(rustc_private, collections)]
#![feature(custom_attribute)]
#![feature(slice_patterns)]
2016-03-23 11:19:13 +00:00
#![feature(question_mark)]
#![feature(stmt_expr_attributes)]
2016-03-11 21:10:40 +00:00
#![allow(indexing_slicing, shadow_reuse, unknown_lints)]
2014-11-19 08:57:34 +00:00
2015-01-10 06:26:58 +00:00
#[macro_use]
2014-11-19 08:57:34 +00:00
extern crate syntax;
2015-01-10 06:26:58 +00:00
#[macro_use]
2014-11-19 08:57:34 +00:00
extern crate rustc;
extern crate toml;
2014-11-20 07:07:37 +00:00
// Only for the compile time checking of paths
extern crate core;
2014-11-20 07:07:37 +00:00
extern crate collections;
2014-11-19 08:57:34 +00:00
// for unicode nfc normalization
extern crate unicode_normalization;
2016-01-09 01:05:43 +00:00
// for semver check in attrs.rs
extern crate semver;
2016-02-04 23:36:06 +00:00
// for regex checking
extern crate regex_syntax;
2016-03-23 11:19:13 +00:00
// for finding minimal boolean expressions
extern crate quine_mc_cluskey;
extern crate rustc_plugin;
extern crate rustc_const_eval;
extern crate rustc_const_math;
use rustc_plugin::Registry;
2014-11-19 08:57:34 +00:00
extern crate clippy_lints;
pub use clippy_lints::*;
macro_rules! declare_restriction_lint {
{ pub $name:tt, $description:tt } => {
declare_lint! { pub $name, Allow, $description }
};
}
mod reexport {
pub use syntax::ast::{Name, NodeId};
}
2014-11-19 08:57:34 +00:00
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
register_plugins(reg);
}
2015-08-21 15:11:34 +00:00
// only exists to let the dogfood integration test works.
// Don't run clippy as an executable directly
#[allow(dead_code, print_stdout)]
fn main() {
panic!("Please use the cargo-clippy executable");
2014-12-10 21:34:58 +00:00
}