mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Move lints config to Cargo config
This commit is contained in:
+95
@@ -19,6 +19,9 @@ unicase = "2.8.1"
|
|||||||
criterion = "0.7.0"
|
criterion = "0.7.0"
|
||||||
tempfile = "3.20.0"
|
tempfile = "3.20.0"
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "eval"
|
name = "eval"
|
||||||
harness = false
|
harness = false
|
||||||
@@ -32,3 +35,95 @@ authors = ["Oliver Hamlet <oliver@ortham.net>"]
|
|||||||
repository = "https://github.com/loot/loot-condition-interpreter.git"
|
repository = "https://github.com/loot/loot-condition-interpreter.git"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
# Deny some rustc lints that are allow-by-default.
|
||||||
|
[workspace.lints.rust]
|
||||||
|
ambiguous_negative_literals = "forbid"
|
||||||
|
impl_trait_overcaptures = "forbid"
|
||||||
|
let_underscore_drop = "forbid"
|
||||||
|
missing_copy_implementations = "forbid"
|
||||||
|
missing_debug_implementations = "forbid"
|
||||||
|
non_ascii_idents = "forbid"
|
||||||
|
redundant_imports = "forbid"
|
||||||
|
redundant_lifetimes = "forbid"
|
||||||
|
trivial_casts = "forbid"
|
||||||
|
trivial_numeric_casts = "forbid"
|
||||||
|
unit_bindings = "forbid"
|
||||||
|
unreachable_pub = "forbid"
|
||||||
|
unsafe_code = "deny"
|
||||||
|
|
||||||
|
[workspace.lints.clippy]
|
||||||
|
pedantic = { level = "deny", priority = -1 }
|
||||||
|
allow_attributes = "deny"
|
||||||
|
as_conversions = "forbid"
|
||||||
|
as_underscore = "forbid"
|
||||||
|
assertions_on_result_states = "deny"
|
||||||
|
big_endian_bytes = "forbid"
|
||||||
|
cfg_not_test = "forbid"
|
||||||
|
clone_on_ref_ptr = "forbid"
|
||||||
|
create_dir = "forbid"
|
||||||
|
dbg_macro = "forbid"
|
||||||
|
decimal_literal_representation = "forbid"
|
||||||
|
default_numeric_fallback = "forbid"
|
||||||
|
doc_include_without_cfg = "forbid"
|
||||||
|
empty_drop = "forbid"
|
||||||
|
error_impl_error = "deny"
|
||||||
|
exit = "forbid"
|
||||||
|
exhaustive_enums = "deny"
|
||||||
|
expect_used = "forbid"
|
||||||
|
filetype_is_file = "deny"
|
||||||
|
float_cmp_const = "forbid"
|
||||||
|
fn_to_numeric_cast_any = "forbid"
|
||||||
|
get_unwrap = "forbid"
|
||||||
|
host_endian_bytes = "forbid"
|
||||||
|
if_then_some_else_none = "forbid"
|
||||||
|
indexing_slicing = "deny"
|
||||||
|
infinite_loop = "forbid"
|
||||||
|
integer_division = "deny"
|
||||||
|
integer_division_remainder_used = "deny"
|
||||||
|
iter_over_hash_type = "deny"
|
||||||
|
let_underscore_must_use = "forbid"
|
||||||
|
lossy_float_literal = "forbid"
|
||||||
|
map_err_ignore = "forbid"
|
||||||
|
map_with_unused_argument_over_ranges = "forbid"
|
||||||
|
mem_forget = "forbid"
|
||||||
|
missing_assert_message = "deny"
|
||||||
|
missing_asserts_for_indexing = "deny"
|
||||||
|
mixed_read_write_in_expression = "forbid"
|
||||||
|
multiple_inherent_impl = "deny"
|
||||||
|
multiple_unsafe_ops_per_block = "deny"
|
||||||
|
mutex_atomic = "forbid"
|
||||||
|
mutex_integer = "forbid"
|
||||||
|
needless_raw_strings = "forbid"
|
||||||
|
non_ascii_literal = "forbid"
|
||||||
|
non_zero_suggestions = "forbid"
|
||||||
|
panic = "deny"
|
||||||
|
panic_in_result_fn = "forbid"
|
||||||
|
partial_pub_fields = "forbid"
|
||||||
|
pathbuf_init_then_push = "forbid"
|
||||||
|
precedence_bits = "forbid"
|
||||||
|
print_stderr = "forbid"
|
||||||
|
print_stdout = "forbid"
|
||||||
|
rc_buffer = "forbid"
|
||||||
|
rc_mutex = "forbid"
|
||||||
|
redundant_type_annotations = "forbid"
|
||||||
|
ref_patterns = "forbid"
|
||||||
|
rest_pat_in_fully_bound_structs = "forbid"
|
||||||
|
str_to_string = "forbid"
|
||||||
|
string_lit_chars_any = "forbid"
|
||||||
|
string_slice = "forbid"
|
||||||
|
string_to_string = "forbid"
|
||||||
|
suspicious_xor_used_as_pow = "forbid"
|
||||||
|
tests_outside_test_module = "forbid"
|
||||||
|
todo = "forbid"
|
||||||
|
try_err = "forbid"
|
||||||
|
undocumented_unsafe_blocks = "deny"
|
||||||
|
unimplemented = "forbid"
|
||||||
|
unnecessary_safety_comment = "forbid"
|
||||||
|
unneeded_field_pattern = "forbid"
|
||||||
|
unreachable = "forbid"
|
||||||
|
unused_result_ok = "forbid"
|
||||||
|
unwrap_in_result = "forbid"
|
||||||
|
unwrap_used = "deny"
|
||||||
|
use_debug = "deny"
|
||||||
|
verbose_file_reads = "forbid"
|
||||||
|
|||||||
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
|
#![allow(clippy::missing_assert_message, clippy::unwrap_used)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate criterion;
|
extern crate criterion;
|
||||||
extern crate loot_condition_interpreter;
|
extern crate loot_condition_interpreter;
|
||||||
@@ -8,14 +9,14 @@ use criterion::Criterion;
|
|||||||
use loot_condition_interpreter::{Expression, GameType, State};
|
use loot_condition_interpreter::{Expression, GameType, State};
|
||||||
|
|
||||||
fn generate_active_plugins() -> Vec<String> {
|
fn generate_active_plugins() -> Vec<String> {
|
||||||
let mut vec: Vec<String> = (0..255).map(|i| format!("Blank{i}.esm")).collect();
|
let mut vec: Vec<String> = (0_u8..255).map(|i| format!("Blank{i}.esm")).collect();
|
||||||
vec.push("Blank.esm".into());
|
vec.push("Blank.esm".into());
|
||||||
vec
|
vec
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate_plugin_versions() -> Vec<(String, String)> {
|
fn generate_plugin_versions() -> Vec<(String, String)> {
|
||||||
let mut vec: Vec<(String, String)> = (0..255)
|
let mut vec: Vec<(String, String)> = (0_u8..255)
|
||||||
.map(|i| (format!("Blank{i}.esm"), "5".to_string()))
|
.map(|i| (format!("Blank{i}.esm"), "5".to_owned()))
|
||||||
.collect();
|
.collect();
|
||||||
vec.push(("Blank.esm".into(), "5".into()));
|
vec.push(("Blank.esm".into(), "5".into()));
|
||||||
vec
|
vec
|
||||||
|
|||||||
@@ -13,3 +13,6 @@ libc = "0.2"
|
|||||||
[lib]
|
[lib]
|
||||||
name = "loot_condition_interpreter_ffi"
|
name = "loot_condition_interpreter_ffi"
|
||||||
crate-type = ["staticlib"]
|
crate-type = ["staticlib"]
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|||||||
+7
-94
@@ -1,97 +1,10 @@
|
|||||||
// Deny some rustc lints that are allow-by-default.
|
#![allow(
|
||||||
#![deny(
|
unsafe_code,
|
||||||
ambiguous_negative_literals,
|
clippy::allow_attributes,
|
||||||
impl_trait_overcaptures,
|
clippy::doc_markdown,
|
||||||
let_underscore_drop,
|
clippy::must_use_candidate,
|
||||||
missing_copy_implementations,
|
clippy::missing_errors_doc,
|
||||||
missing_debug_implementations,
|
clippy::missing_safety_doc
|
||||||
non_ascii_idents,
|
|
||||||
redundant_imports,
|
|
||||||
redundant_lifetimes,
|
|
||||||
trivial_casts,
|
|
||||||
trivial_numeric_casts,
|
|
||||||
unit_bindings,
|
|
||||||
unreachable_pub
|
|
||||||
)]
|
|
||||||
#![deny(clippy::pedantic)]
|
|
||||||
// Allow a few clippy pedantic lints.
|
|
||||||
#![allow(clippy::doc_markdown)]
|
|
||||||
#![allow(clippy::must_use_candidate)]
|
|
||||||
#![allow(clippy::missing_errors_doc)]
|
|
||||||
#![allow(clippy::missing_safety_doc)]
|
|
||||||
// Selectively deny clippy restriction lints.
|
|
||||||
#![deny(
|
|
||||||
clippy::as_conversions,
|
|
||||||
clippy::as_underscore,
|
|
||||||
clippy::assertions_on_result_states,
|
|
||||||
clippy::big_endian_bytes,
|
|
||||||
clippy::cfg_not_test,
|
|
||||||
clippy::clone_on_ref_ptr,
|
|
||||||
clippy::create_dir,
|
|
||||||
clippy::dbg_macro,
|
|
||||||
clippy::decimal_literal_representation,
|
|
||||||
clippy::default_numeric_fallback,
|
|
||||||
clippy::doc_include_without_cfg,
|
|
||||||
clippy::empty_drop,
|
|
||||||
clippy::error_impl_error,
|
|
||||||
clippy::exit,
|
|
||||||
clippy::exhaustive_enums,
|
|
||||||
clippy::expect_used,
|
|
||||||
clippy::filetype_is_file,
|
|
||||||
clippy::float_cmp_const,
|
|
||||||
clippy::fn_to_numeric_cast_any,
|
|
||||||
clippy::get_unwrap,
|
|
||||||
clippy::host_endian_bytes,
|
|
||||||
clippy::if_then_some_else_none,
|
|
||||||
clippy::indexing_slicing,
|
|
||||||
clippy::infinite_loop,
|
|
||||||
clippy::integer_division,
|
|
||||||
clippy::integer_division_remainder_used,
|
|
||||||
clippy::iter_over_hash_type,
|
|
||||||
clippy::let_underscore_must_use,
|
|
||||||
clippy::lossy_float_literal,
|
|
||||||
clippy::map_err_ignore,
|
|
||||||
clippy::map_with_unused_argument_over_ranges,
|
|
||||||
clippy::mem_forget,
|
|
||||||
clippy::missing_assert_message,
|
|
||||||
clippy::missing_asserts_for_indexing,
|
|
||||||
clippy::mixed_read_write_in_expression,
|
|
||||||
clippy::multiple_unsafe_ops_per_block,
|
|
||||||
clippy::mutex_atomic,
|
|
||||||
clippy::mutex_integer,
|
|
||||||
clippy::needless_raw_strings,
|
|
||||||
clippy::non_ascii_literal,
|
|
||||||
clippy::non_zero_suggestions,
|
|
||||||
clippy::panic,
|
|
||||||
clippy::panic_in_result_fn,
|
|
||||||
clippy::partial_pub_fields,
|
|
||||||
clippy::pathbuf_init_then_push,
|
|
||||||
clippy::precedence_bits,
|
|
||||||
clippy::print_stderr,
|
|
||||||
clippy::print_stdout,
|
|
||||||
clippy::rc_buffer,
|
|
||||||
clippy::rc_mutex,
|
|
||||||
clippy::redundant_type_annotations,
|
|
||||||
clippy::ref_patterns,
|
|
||||||
clippy::rest_pat_in_fully_bound_structs,
|
|
||||||
clippy::str_to_string,
|
|
||||||
clippy::string_lit_chars_any,
|
|
||||||
clippy::string_slice,
|
|
||||||
clippy::string_to_string,
|
|
||||||
clippy::suspicious_xor_used_as_pow,
|
|
||||||
clippy::tests_outside_test_module,
|
|
||||||
clippy::todo,
|
|
||||||
clippy::try_err,
|
|
||||||
clippy::undocumented_unsafe_blocks,
|
|
||||||
clippy::unimplemented,
|
|
||||||
clippy::unnecessary_safety_comment,
|
|
||||||
clippy::unneeded_field_pattern,
|
|
||||||
clippy::unreachable,
|
|
||||||
clippy::unused_result_ok,
|
|
||||||
clippy::unwrap_in_result,
|
|
||||||
clippy::unwrap_used,
|
|
||||||
clippy::use_debug,
|
|
||||||
clippy::verbose_file_reads
|
|
||||||
)]
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
test,
|
test,
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
#![allow(
|
||||||
|
clippy::multiple_inherent_impl,
|
||||||
|
reason = "impl Function is split between parsing and eval"
|
||||||
|
)]
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::mem::discriminant;
|
use std::mem::discriminant;
|
||||||
|
|||||||
+5
-95
@@ -1,98 +1,8 @@
|
|||||||
// Deny some rustc lints that are allow-by-default.
|
#![allow(
|
||||||
#![deny(
|
clippy::doc_markdown,
|
||||||
ambiguous_negative_literals,
|
clippy::exhaustive_enums,
|
||||||
impl_trait_overcaptures,
|
clippy::must_use_candidate,
|
||||||
let_underscore_drop,
|
clippy::missing_errors_doc
|
||||||
missing_copy_implementations,
|
|
||||||
missing_debug_implementations,
|
|
||||||
non_ascii_idents,
|
|
||||||
redundant_imports,
|
|
||||||
redundant_lifetimes,
|
|
||||||
trivial_casts,
|
|
||||||
trivial_numeric_casts,
|
|
||||||
unit_bindings,
|
|
||||||
unreachable_pub,
|
|
||||||
unsafe_code
|
|
||||||
)]
|
|
||||||
#![deny(clippy::pedantic)]
|
|
||||||
// Allow a few clippy pedantic lints.
|
|
||||||
#![allow(clippy::doc_markdown)]
|
|
||||||
#![allow(clippy::must_use_candidate)]
|
|
||||||
#![allow(clippy::missing_errors_doc)]
|
|
||||||
// Selectively deny clippy restriction lints.
|
|
||||||
#![deny(
|
|
||||||
clippy::allow_attributes,
|
|
||||||
clippy::as_conversions,
|
|
||||||
clippy::as_underscore,
|
|
||||||
clippy::assertions_on_result_states,
|
|
||||||
clippy::big_endian_bytes,
|
|
||||||
clippy::cfg_not_test,
|
|
||||||
clippy::clone_on_ref_ptr,
|
|
||||||
clippy::create_dir,
|
|
||||||
clippy::dbg_macro,
|
|
||||||
clippy::decimal_literal_representation,
|
|
||||||
clippy::default_numeric_fallback,
|
|
||||||
clippy::doc_include_without_cfg,
|
|
||||||
clippy::empty_drop,
|
|
||||||
clippy::error_impl_error,
|
|
||||||
clippy::exit,
|
|
||||||
// clippy::exhaustive_enums,
|
|
||||||
clippy::expect_used,
|
|
||||||
clippy::filetype_is_file,
|
|
||||||
clippy::float_cmp_const,
|
|
||||||
clippy::fn_to_numeric_cast_any,
|
|
||||||
clippy::get_unwrap,
|
|
||||||
clippy::host_endian_bytes,
|
|
||||||
clippy::if_then_some_else_none,
|
|
||||||
clippy::indexing_slicing,
|
|
||||||
clippy::infinite_loop,
|
|
||||||
clippy::integer_division,
|
|
||||||
clippy::integer_division_remainder_used,
|
|
||||||
clippy::iter_over_hash_type,
|
|
||||||
clippy::let_underscore_must_use,
|
|
||||||
clippy::lossy_float_literal,
|
|
||||||
clippy::map_err_ignore,
|
|
||||||
clippy::map_with_unused_argument_over_ranges,
|
|
||||||
clippy::mem_forget,
|
|
||||||
clippy::missing_assert_message,
|
|
||||||
clippy::missing_asserts_for_indexing,
|
|
||||||
clippy::mixed_read_write_in_expression,
|
|
||||||
clippy::multiple_unsafe_ops_per_block,
|
|
||||||
clippy::mutex_atomic,
|
|
||||||
clippy::mutex_integer,
|
|
||||||
clippy::needless_raw_strings,
|
|
||||||
clippy::non_ascii_literal,
|
|
||||||
clippy::non_zero_suggestions,
|
|
||||||
clippy::panic,
|
|
||||||
clippy::panic_in_result_fn,
|
|
||||||
clippy::partial_pub_fields,
|
|
||||||
clippy::pathbuf_init_then_push,
|
|
||||||
clippy::precedence_bits,
|
|
||||||
clippy::print_stderr,
|
|
||||||
clippy::print_stdout,
|
|
||||||
clippy::rc_buffer,
|
|
||||||
clippy::rc_mutex,
|
|
||||||
clippy::redundant_type_annotations,
|
|
||||||
clippy::ref_patterns,
|
|
||||||
clippy::rest_pat_in_fully_bound_structs,
|
|
||||||
clippy::str_to_string,
|
|
||||||
clippy::string_lit_chars_any,
|
|
||||||
clippy::string_slice,
|
|
||||||
clippy::string_to_string,
|
|
||||||
clippy::suspicious_xor_used_as_pow,
|
|
||||||
clippy::tests_outside_test_module,
|
|
||||||
clippy::todo,
|
|
||||||
clippy::try_err,
|
|
||||||
clippy::undocumented_unsafe_blocks,
|
|
||||||
clippy::unimplemented,
|
|
||||||
clippy::unnecessary_safety_comment,
|
|
||||||
clippy::unneeded_field_pattern,
|
|
||||||
clippy::unreachable,
|
|
||||||
clippy::unused_result_ok,
|
|
||||||
clippy::unwrap_in_result,
|
|
||||||
clippy::unwrap_used,
|
|
||||||
clippy::use_debug,
|
|
||||||
clippy::verbose_file_reads,
|
|
||||||
)]
|
)]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
test,
|
test,
|
||||||
|
|||||||
Reference in New Issue
Block a user