feat: add rust language settings
This commit is contained in:
+129
@@ -0,0 +1,129 @@
|
|||||||
|
[lints.rust]
|
||||||
|
ambiguous_negative_literals = "warn"
|
||||||
|
closure_returning_async_block = "warn"
|
||||||
|
elided_lifetimes_in_paths = "warn"
|
||||||
|
explicit_outlives_requirements = "warn"
|
||||||
|
ffi_unwind_calls = "warn"
|
||||||
|
let_underscore_drop = "warn"
|
||||||
|
linker_messages = "warn"
|
||||||
|
macro_use_extern_crate = "warn"
|
||||||
|
meta_variable_misuse = "warn"
|
||||||
|
missing_docs = "warn"
|
||||||
|
missing_unsafe_on_extern = "warn"
|
||||||
|
non_ascii_idents = "warn"
|
||||||
|
redundant_imports = "warn"
|
||||||
|
redundant_lifetimes = "warn"
|
||||||
|
single_use_lifetimes = "warn"
|
||||||
|
trivial_numeric_casts = "warn"
|
||||||
|
unit_bindings = "warn"
|
||||||
|
unnameable_types = "warn"
|
||||||
|
unreachable_pub = "warn"
|
||||||
|
unsafe_attr_outside_unsafe = "warn"
|
||||||
|
unsafe_op_in_unsafe_fn = "warn"
|
||||||
|
unused_crate_dependencies = "warn"
|
||||||
|
unused_extern_crates = "warn"
|
||||||
|
unused_import_braces = "warn"
|
||||||
|
unused_lifetimes = "warn"
|
||||||
|
unused_macro_rules = "warn"
|
||||||
|
unused_qualifications = "warn"
|
||||||
|
unused_results = "warn"
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
pedantic = "warn"
|
||||||
|
|
||||||
|
# restriction
|
||||||
|
absolute_paths = "warn"
|
||||||
|
alloc_instead_of_core = "warn"
|
||||||
|
allow_attributes = "warn"
|
||||||
|
allow_attributes_without_reason = "warn"
|
||||||
|
arbitrary_source_item_ordering = "warn"
|
||||||
|
as_pointer_underscore = "warn"
|
||||||
|
as_underscore = "warn"
|
||||||
|
assertions_on_result_states = "warn"
|
||||||
|
cfg_not_test = "warn"
|
||||||
|
clone_on_ref_ptr = "warn"
|
||||||
|
create_dir = "warn"
|
||||||
|
dbg_macro = "warn"
|
||||||
|
decimal_literal_representation = "warn"
|
||||||
|
default_numeric_fallback = "warn"
|
||||||
|
default_union_representation = "warn"
|
||||||
|
doc_include_without_cfg = "warn"
|
||||||
|
doc_paragraphs_missing_punctuation = "warn"
|
||||||
|
else_if_without_else = "warn"
|
||||||
|
empty_enum_variants_with_brackets = "warn"
|
||||||
|
empty_structs_with_brackets = "warn"
|
||||||
|
error_impl_error = "warn"
|
||||||
|
exit = "warn"
|
||||||
|
field_scoped_visibility_modifiers = "warn"
|
||||||
|
float_cmp_const = "warn"
|
||||||
|
fn_to_numeric_cast_any = "warn"
|
||||||
|
get_unwrap = "warn"
|
||||||
|
if_then_some_else_none = "warn"
|
||||||
|
impl_trait_in_params = "warn"
|
||||||
|
indexing_slicing = "warn"
|
||||||
|
infinite_loop = "warn"
|
||||||
|
let_underscore_must_use = "warn"
|
||||||
|
lossy_float_literal = "warn"
|
||||||
|
map_err_ignore = "warn"
|
||||||
|
map_with_unused_argument_over_ranges = "warn"
|
||||||
|
mem_forget = "warn"
|
||||||
|
missing_assert_message = "warn"
|
||||||
|
missing_asserts_for_indexing = "warn"
|
||||||
|
missing_docs_in_private_items = "warn"
|
||||||
|
missing_inline_in_public_items = "warn"
|
||||||
|
module_name_repetitions = "warn"
|
||||||
|
multiple_inherent_impl = "warn"
|
||||||
|
multiple_unsafe_ops_per_block = "warn"
|
||||||
|
mutex_atomic = "warn"
|
||||||
|
needless_raw_strings = "warn"
|
||||||
|
non_zero_suggestions = "warn"
|
||||||
|
panic = "warn"
|
||||||
|
partial_pub_fields = "warn"
|
||||||
|
pathbuf_init_then_push = "warn"
|
||||||
|
pattern_type_mismatch = "warn"
|
||||||
|
pointer_format = "warn"
|
||||||
|
precedence_bits = "warn"
|
||||||
|
pub_use = "warn"
|
||||||
|
pub_without_shorthand = "warn"
|
||||||
|
rc_buffer = "warn"
|
||||||
|
rc_mutex = "warn"
|
||||||
|
redundant_test_prefix = "warn"
|
||||||
|
redundant_type_annotations = "warn"
|
||||||
|
renamed_function_params = "warn"
|
||||||
|
rest_pat_in_fully_bound_structs = "warn"
|
||||||
|
return_and_then = "warn"
|
||||||
|
same_name_method = "warn"
|
||||||
|
self_named_module_files = "warn"
|
||||||
|
semicolon_inside_block = "warn"
|
||||||
|
shadow_reuse = "warn"
|
||||||
|
shadow_same = "warn"
|
||||||
|
shadow_unrelated = "warn"
|
||||||
|
single_char_lifetime_names = "warn"
|
||||||
|
str_to_string = "warn"
|
||||||
|
string_add = "warn"
|
||||||
|
string_lit_chars_any = "warn"
|
||||||
|
string_slice = "warn"
|
||||||
|
suspicious_xor_used_as_pow = "warn"
|
||||||
|
tests_outside_test_module = "warn"
|
||||||
|
todo = "warn"
|
||||||
|
try_err = "warn"
|
||||||
|
undocumented_unsafe_blocks = "warn"
|
||||||
|
unnecessary_safety_comment = "warn"
|
||||||
|
unnecessary_safety_doc = "warn"
|
||||||
|
unnecessary_self_imports = "warn"
|
||||||
|
unneeded_field_pattern = "warn"
|
||||||
|
unreachable = "warn"
|
||||||
|
unseparated_literal_suffix = "warn"
|
||||||
|
unused_result_ok = "warn"
|
||||||
|
unused_trait_names = "warn"
|
||||||
|
unwrap_in_result = "warn"
|
||||||
|
unwrap_used = "warn"
|
||||||
|
use_debug = "warn"
|
||||||
|
verbose_file_reads = "warn"
|
||||||
|
wildcard_enum_match_arm = "warn"
|
||||||
|
|
||||||
|
# cargo
|
||||||
|
negative_feature_names = "warn"
|
||||||
|
redundant_feature_names = "warn"
|
||||||
|
wildcard_dependencies = "warn"
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
check-private-items = true
|
||||||
|
trait-assoc-item-kinds-order = ["const", "type", "fn"]
|
||||||
|
module-item-order-groupings = [
|
||||||
|
["modules", ["extern_crate", "mod", "foreign_mod"]],
|
||||||
|
["use", ["use"]],
|
||||||
|
["macros", ["macro", "global_asm"]],
|
||||||
|
["constants", ["static", "const"]],
|
||||||
|
["types", ["ty_alias", "enum", "struct", "union", "trait", "trait_alias"]],
|
||||||
|
["functions", ["fn"]],
|
||||||
|
["implementations", ["impl"]],
|
||||||
|
]
|
||||||
|
module-items-ordered-within-groupings = "all"
|
||||||
|
missing-docs-allow-unused = true
|
||||||
|
|
||||||
Reference in New Issue
Block a user