mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-09 20:39:55 +00:00
78 lines
2.2 KiB
Rust
78 lines
2.2 KiB
Rust
|
//! TODO
|
||
|
|
||
|
//---------------------------------------------------------------------------------------------------- Lints
|
||
|
// Forbid lints.
|
||
|
// Our code, and code generated (e.g macros) cannot overrule these.
|
||
|
#![forbid(
|
||
|
// `unsafe` is allowed but it _must_ be
|
||
|
// commented with `SAFETY: reason`.
|
||
|
clippy::undocumented_unsafe_blocks,
|
||
|
// Never.
|
||
|
unused_unsafe,
|
||
|
redundant_semicolons,
|
||
|
unused_allocation,
|
||
|
coherence_leak_check,
|
||
|
while_true,
|
||
|
clippy::missing_docs_in_private_items,
|
||
|
// Maybe can be put into `#[deny]`.
|
||
|
unconditional_recursion,
|
||
|
for_loops_over_fallibles,
|
||
|
unused_braces,
|
||
|
unused_doc_comments,
|
||
|
unused_labels,
|
||
|
keyword_idents,
|
||
|
non_ascii_idents,
|
||
|
variant_size_differences,
|
||
|
single_use_lifetimes,
|
||
|
// Probably can be put into `#[deny]`.
|
||
|
future_incompatible,
|
||
|
let_underscore,
|
||
|
break_with_label_and_loop,
|
||
|
duplicate_macro_attributes,
|
||
|
exported_private_dependencies,
|
||
|
large_assignments,
|
||
|
overlapping_range_endpoints,
|
||
|
semicolon_in_expressions_from_macros,
|
||
|
noop_method_call,
|
||
|
unreachable_pub,
|
||
|
)]
|
||
|
// Deny lints.
|
||
|
// Some of these are `#[allow]`'ed on a per-case basis.
|
||
|
#![deny(
|
||
|
clippy::all,
|
||
|
clippy::correctness,
|
||
|
clippy::suspicious,
|
||
|
clippy::style,
|
||
|
clippy::complexity,
|
||
|
clippy::perf,
|
||
|
clippy::pedantic,
|
||
|
clippy::nursery,
|
||
|
clippy::cargo,
|
||
|
unused_mut,
|
||
|
missing_docs,
|
||
|
deprecated,
|
||
|
unused_comparisons,
|
||
|
nonstandard_style
|
||
|
)]
|
||
|
#![allow(unreachable_code, unused_variables, dead_code, unused_imports)] // TODO: remove
|
||
|
#![allow(
|
||
|
// FIXME: this lint affects crates outside of
|
||
|
// `database/` for some reason, allow for now.
|
||
|
clippy::cargo_common_metadata,
|
||
|
// FIXME: adding `#[must_use]` onto everything
|
||
|
// might just be more annoying than useful...
|
||
|
// although it is sometimes nice.
|
||
|
clippy::must_use_candidate,
|
||
|
// TODO: should be removed after all `todo!()`'s are gone.
|
||
|
clippy::diverging_sub_expression,
|
||
|
clippy::module_name_repetitions,
|
||
|
clippy::module_inception,
|
||
|
clippy::redundant_pub_crate,
|
||
|
clippy::option_if_let_else,
|
||
|
clippy::significant_drop_tightening,
|
||
|
)]
|
||
|
// Allow some lints when running in debug mode.
|
||
|
#![cfg_attr(debug_assertions, allow(clippy::todo, clippy::multiple_crate_versions))]
|
||
|
|
||
|
//---------------------------------------------------------------------------------------------------- Modules
|