2016-05-24 18:25:25 +02:00
|
|
|
// error-pattern:cargo-clippy
|
2016-02-22 14:25:51 +01:00
|
|
|
#![feature(type_macros)]
|
2015-01-10 07:26:58 +01:00
|
|
|
#![feature(plugin_registrar, box_syntax)]
|
2015-12-09 21:56:49 +01:00
|
|
|
#![feature(rustc_private, collections)]
|
2016-01-04 05:43:56 +01:00
|
|
|
#![feature(custom_attribute)]
|
2016-03-14 16:41:41 +01:00
|
|
|
#![feature(slice_patterns)]
|
2016-03-23 12:19:13 +01:00
|
|
|
#![feature(question_mark)]
|
|
|
|
#![feature(stmt_expr_attributes)]
|
2016-03-11 22:10:40 +01:00
|
|
|
#![allow(indexing_slicing, shadow_reuse, unknown_lints)]
|
2014-11-19 09:57:34 +01:00
|
|
|
|
2015-01-10 07:26:58 +01:00
|
|
|
#[macro_use]
|
2014-11-19 09:57:34 +01:00
|
|
|
extern crate syntax;
|
2015-01-10 07:26:58 +01:00
|
|
|
#[macro_use]
|
2014-11-19 09:57:34 +01:00
|
|
|
extern crate rustc;
|
|
|
|
|
2016-02-21 20:11:32 +01:00
|
|
|
extern crate toml;
|
|
|
|
|
2014-11-20 08:07:37 +01:00
|
|
|
// Only for the compile time checking of paths
|
2015-08-16 09:03:06 +02:00
|
|
|
extern crate core;
|
2014-11-20 08:07:37 +01:00
|
|
|
extern crate collections;
|
2014-11-19 09:57:34 +01:00
|
|
|
|
2015-09-04 09:08:07 +02:00
|
|
|
// for unicode nfc normalization
|
|
|
|
extern crate unicode_normalization;
|
|
|
|
|
2016-01-09 02:05:43 +01:00
|
|
|
// for semver check in attrs.rs
|
|
|
|
extern crate semver;
|
|
|
|
|
2016-02-05 00:36:06 +01:00
|
|
|
// for regex checking
|
|
|
|
extern crate regex_syntax;
|
|
|
|
|
2016-03-23 12:19:13 +01:00
|
|
|
// for finding minimal boolean expressions
|
|
|
|
extern crate quine_mc_cluskey;
|
|
|
|
|
2015-11-27 14:47:00 +01:00
|
|
|
extern crate rustc_plugin;
|
2016-03-15 16:33:08 +01:00
|
|
|
extern crate rustc_const_eval;
|
2016-03-31 17:05:43 +02:00
|
|
|
extern crate rustc_const_math;
|
2015-11-27 14:47:00 +01:00
|
|
|
use rustc_plugin::Registry;
|
2014-11-19 09:57:34 +01:00
|
|
|
|
2016-05-24 18:25:25 +02:00
|
|
|
extern crate clippy_lints;
|
|
|
|
|
|
|
|
pub use clippy_lints::*;
|
|
|
|
|
2016-04-30 23:54:10 +02:00
|
|
|
macro_rules! declare_restriction_lint {
|
|
|
|
{ pub $name:tt, $description:tt } => {
|
|
|
|
declare_lint! { pub $name, Allow, $description }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-09-03 16:42:17 +02:00
|
|
|
mod reexport {
|
2015-12-09 21:56:49 +01:00
|
|
|
pub use syntax::ast::{Name, NodeId};
|
2015-09-03 16:42:17 +02:00
|
|
|
}
|
|
|
|
|
2014-11-19 09:57:34 +01:00
|
|
|
#[plugin_registrar]
|
|
|
|
pub fn plugin_registrar(reg: &mut Registry) {
|
2016-05-24 18:25:25 +02:00
|
|
|
register_plugins(reg);
|
|
|
|
}
|
2015-08-21 17:11:34 +02:00
|
|
|
|
2016-05-24 18:25:25 +02: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 22:34:58 +01:00
|
|
|
}
|