bevy_lint/lib.rs
1//! `bevy_lint` is a custom linter for the [Bevy game engine](https://bevyengine.org), similar to
2//! [Clippy](https://doc.rust-lang.org/stable/clippy).
3//!
4//! This is the primary documentation for its lints and lint groups. `bevy_lint` is not intended to
5//! be consumed as a library. You can find the documentation for individual lints and their groups
6//! in the [`lints`] module.
7//!
8//! <!--
9//! Override these links to point to the local copy of the docs.
10//! For more info on how this works, see <https://linebender.org/blog/doc-include/>.
11//! -->
12//! [**Documentation**]: crate
13//! [**All Lints**]: crate::lints
14#![doc = include_str!("../README.md")]
15// Enables linking to `rustc` crates.
16#![feature(rustc_private)]
17// Allows chaining `if let` multiple times using `&&`.
18#![feature(let_chains)]
19// Warn on internal `rustc` lints that check for poor usage of internal compiler APIs. Note that
20// you also need to pass `-Z unstable-options` to `rustc` for this to be enabled:
21// `RUSTFLAGS="-Zunstable-options" cargo check`
22#![warn(rustc::internal)]
23#![allow(
24 rustc::usage_of_ty_tykind,
25 reason = "Many false positives without a valid replacement."
26)]
27
28// This is a list of every single `rustc` crate used within this library. If you need another, add
29// it here!
30extern crate rustc_abi;
31extern crate rustc_data_structures;
32extern crate rustc_driver;
33extern crate rustc_errors;
34extern crate rustc_hir;
35extern crate rustc_hir_analysis;
36extern crate rustc_interface;
37extern crate rustc_lint;
38extern crate rustc_lint_defs;
39extern crate rustc_middle;
40extern crate rustc_session;
41extern crate rustc_span;
42
43mod callback;
44mod config;
45mod lint;
46pub mod lints;
47mod paths;
48mod utils;
49
50pub use self::callback::BevyLintCallback;