2016-05-24 16:25:25 +00:00
|
|
|
// 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)]
|
2015-12-09 20:56:49 +00:00
|
|
|
#![feature(rustc_private, collections)]
|
2016-01-04 04:43:56 +00:00
|
|
|
#![feature(custom_attribute)]
|
2016-03-14 15:41:41 +00:00
|
|
|
#![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;
|
|
|
|
|
2016-02-21 19:11:32 +00:00
|
|
|
extern crate toml;
|
|
|
|
|
2014-11-20 07:07:37 +00:00
|
|
|
// Only for the compile time checking of paths
|
2015-08-16 07:03:06 +00:00
|
|
|
extern crate core;
|
2014-11-20 07:07:37 +00:00
|
|
|
extern crate collections;
|
2014-11-19 08:57:34 +00:00
|
|
|
|
2015-09-04 07:08:07 +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;
|
|
|
|
|
2015-11-27 13:47:00 +00:00
|
|
|
extern crate rustc_plugin;
|
2016-03-15 15:33:08 +00:00
|
|
|
extern crate rustc_const_eval;
|
2016-03-31 15:05:43 +00:00
|
|
|
extern crate rustc_const_math;
|
2015-11-27 13:47:00 +00:00
|
|
|
use rustc_plugin::Registry;
|
2014-11-19 08:57:34 +00:00
|
|
|
|
2016-05-24 16:25:25 +00:00
|
|
|
extern crate clippy_lints;
|
|
|
|
|
|
|
|
pub use clippy_lints::*;
|
|
|
|
|
2016-04-30 21:54:10 +00:00
|
|
|
macro_rules! declare_restriction_lint {
|
|
|
|
{ pub $name:tt, $description:tt } => {
|
|
|
|
declare_lint! { pub $name, Allow, $description }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-09-03 14:42:17 +00:00
|
|
|
mod reexport {
|
2015-12-09 20:56:49 +00:00
|
|
|
pub use syntax::ast::{Name, NodeId};
|
2015-09-03 14:42:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-19 08:57:34 +00:00
|
|
|
#[plugin_registrar]
|
|
|
|
pub fn plugin_registrar(reg: &mut Registry) {
|
2016-05-24 16:25:25 +00:00
|
|
|
register_plugins(reg);
|
|
|
|
}
|
2015-08-21 15:11:34 +00:00
|
|
|
|
2016-05-24 16:25:25 +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
|
|
|
}
|