You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
5.8 KiB

# https://github.com/ericseppanen/cargo-cranky
# cargo install cargo-cranky && cargo cranky
# See also clippy.toml
deny = ["unsafe_code"]
warn = [
"clippy::all",
"clippy::as_ptr_cast_mut",
"clippy::await_holding_lock",
"clippy::bool_to_int_with_if",
"clippy::branches_sharing_code",
"clippy::char_lit_as_u8",
"clippy::checked_conversions",
"clippy::clear_with_drain",
"clippy::cloned_instead_of_copied",
"clippy::dbg_macro",
"clippy::debug_assert_with_mut_call",
"clippy::default_union_representation",
"clippy::derive_partial_eq_without_eq",
"clippy::disallowed_macros", # See clippy.toml
"clippy::disallowed_methods", # See clippy.toml
"clippy::disallowed_names", # See clippy.toml
"clippy::disallowed_script_idents", # See clippy.toml
"clippy::disallowed_types", # See clippy.toml
"clippy::doc_link_with_quotes",
"clippy::doc_markdown",
"clippy::empty_enum",
"clippy::empty_line_after_outer_attr",
"clippy::enum_glob_use",
"clippy::equatable_if_let",
"clippy::exit",
"clippy::expl_impl_clone_on_copy",
"clippy::explicit_deref_methods",
"clippy::explicit_into_iter_loop",
"clippy::explicit_iter_loop",
"clippy::fallible_impl_from",
"clippy::filter_map_next",
"clippy::flat_map_option",
"clippy::float_cmp_const",
"clippy::fn_params_excessive_bools",
"clippy::fn_to_numeric_cast_any",
"clippy::from_iter_instead_of_collect",
"clippy::get_unwrap",
"clippy::if_let_mutex",
"clippy::implicit_clone",
"clippy::imprecise_flops",
"clippy::index_refutable_slice",
"clippy::inefficient_to_string",
"clippy::invalid_upcast_comparisons",
"clippy::iter_not_returning_iterator",
"clippy::iter_on_empty_collections",
"clippy::iter_on_single_items",
"clippy::large_digit_groups",
"clippy::large_include_file",
"clippy::large_stack_arrays",
"clippy::large_stack_frames",
"clippy::large_types_passed_by_value",
"clippy::let_unit_value",
"clippy::linkedlist",
"clippy::lossy_float_literal",
"clippy::macro_use_imports",
"clippy::manual_assert",
"clippy::manual_clamp",
"clippy::manual_instant_elapsed",
"clippy::manual_let_else",
"clippy::manual_ok_or",
"clippy::manual_string_new",
"clippy::map_err_ignore",
"clippy::map_flatten",
"clippy::map_unwrap_or",
"clippy::match_on_vec_items",
"clippy::match_same_arms",
"clippy::match_wild_err_arm",
"clippy::match_wildcard_for_single_variants",
"clippy::mem_forget",
"clippy::mismatched_target_os",
"clippy::mismatching_type_param_order",
"clippy::missing_enforced_import_renames",
"clippy::missing_errors_doc",
"clippy::missing_safety_doc",
"clippy::mut_mut",
"clippy::mutex_integer",
"clippy::needless_borrow",
"clippy::needless_continue",
"clippy::needless_for_each",
"clippy::needless_pass_by_value",
"clippy::negative_feature_names",
"clippy::nonstandard_macro_braces",
"clippy::option_option",
"clippy::path_buf_push_overwrite",
"clippy::print_stdout",
"clippy::ptr_as_ptr",
"clippy::ptr_cast_constness",
"clippy::pub_without_shorthand",
"clippy::rc_mutex",
"clippy::redundant_type_annotations",
"clippy::ref_option_ref",
"clippy::rest_pat_in_fully_bound_structs",
"clippy::same_functions_in_if_condition",
"clippy::semicolon_if_nothing_returned",
"clippy::significant_drop_tightening",
"clippy::single_match_else",
"clippy::str_to_string",
"clippy::string_add_assign",
"clippy::string_add",
"clippy::string_lit_as_bytes",
"clippy::string_to_string",
"clippy::suspicious_command_arg_space",
"clippy::suspicious_xor_used_as_pow",
"clippy::todo",
"clippy::trailing_empty_array",
"clippy::trait_duplication_in_bounds",
"clippy::transmute_ptr_to_ptr",
"clippy::tuple_array_conversions",
"clippy::unchecked_duration_subtraction",
"clippy::undocumented_unsafe_blocks",
"clippy::unimplemented",
"clippy::uninlined_format_args",
"clippy::unnecessary_box_returns",
"clippy::unnecessary_safety_comment",
"clippy::unnecessary_safety_doc",
"clippy::unnecessary_self_imports",
"clippy::unnecessary_struct_initialization",
"clippy::unnecessary_wraps",
"clippy::unnested_or_patterns",
"clippy::unused_peekable",
"clippy::unused_rounding",
"clippy::unused_self",
"clippy::use_self",
"clippy::useless_transmute",
"clippy::verbose_file_reads",
"clippy::wildcard_dependencies",
"clippy::wildcard_imports",
"clippy::zero_sized_map_values",
"elided_lifetimes_in_paths",
"future_incompatible",
"nonstandard_style",
"rust_2018_idioms",
"rust_2021_prelude_collisions",
"rustdoc::missing_crate_level_docs",
"semicolon_in_expressions_from_macros",
"trivial_numeric_casts",
"unsafe_op_in_unsafe_fn", # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
"unused_extern_crates",
"unused_import_braces",
"unused_lifetimes",
# Enable when we update MSRV:
# "clippy::implied_bounds_in_impls",
# "clippy::needless_pass_by_ref_mut",
# "clippy::readonly_write_lock",
# "clippy::should_panic_without_expect",
# "clippy::string_lit_chars_any",
]
allow = [
"clippy::manual_range_contains", # this one is just worse imho
"clippy::significant_drop_tightening", # A lot of false positives
Update dependencies in Cargo.lock (#3401) * Update to ehttp 0.3.1 with better error messages * Explain why we are using an old cocoa * cargo update ❯ cargo update Updating crates.io index Updating accesskit v0.11.0 -> v0.11.2 Updating accesskit_consumer v0.15.0 -> v0.15.2 Updating accesskit_macos v0.7.0 -> v0.9.0 Updating accesskit_unix v0.5.0 -> v0.5.2 Updating accesskit_windows v0.14.0 -> v0.14.3 Updating accesskit_winit v0.14.0 -> v0.14.4 Updating addr2line v0.19.0 -> v0.21.0 Removing ahash v0.7.6 Updating aho-corasick v1.0.1 -> v1.1.1 Adding allocator-api2 v0.2.16 Updating android-activity v0.4.1 -> v0.4.3 Adding android-tzdata v0.1.1 Updating anyhow v1.0.71 -> v1.0.75 Updating arboard v3.2.0 -> v3.2.1 Updating arrayvec v0.7.2 -> v0.7.4 Updating async-channel v1.8.0 -> v1.9.0 Updating async-executor v1.5.1 -> v1.5.3 Adding async-fs v1.6.0 Updating async-lock v2.7.0 -> v2.8.0 Adding async-process v1.8.0 Updating async-recursion v1.0.4 -> v1.0.5 Adding async-signal v0.2.1 Updating async-task v4.4.0 -> v4.4.1 Updating async-trait v0.1.68 -> v0.1.73 Adding atomic-waker v1.1.2 Updating backtrace v0.3.67 -> v0.3.69 Adding base64 v0.21.4 Updating bindgen v0.65.1 -> v0.68.1 Updating bitflags v2.3.1 -> v2.4.0 Adding blocking v1.4.0 Updating bumpalo v3.13.0 -> v3.14.0 Updating bytemuck v1.13.1 -> v1.14.0 Updating bytemuck_derive v1.4.1 -> v1.5.0 Updating bytes v1.4.0 -> v1.5.0 Updating calloop v0.10.5 -> v0.10.6 Updating cc v1.0.79 -> v1.0.83 Updating cfg-expr v0.15.1 -> v0.15.5 Updating chrono v0.4.24 -> v0.4.31 Updating cocoa-foundation v0.1.1 -> v0.1.2 Updating concurrent-queue v2.2.0 -> v2.3.0 Updating core-graphics-types v0.1.1 -> v0.1.2 Updating cpufeatures v0.2.7 -> v0.2.9 Updating crossbeam-utils v0.8.15 -> v0.8.16 Adding deranged v0.3.8 Removing dirs v4.0.0 Removing dirs-sys v0.3.7 Updating dlib v0.5.0 -> v0.5.2 Updating dyn-clone v1.0.11 -> v1.0.14 Updating either v1.8.1 -> v1.9.0 Updating enum-map v2.5.0 -> v2.6.3 Updating enum-map-derive v0.11.0 -> v0.14.0 Updating enumflags2 v0.7.7 -> v0.7.8 Updating enumflags2_derive v0.7.7 -> v0.7.8 Updating enumn v0.1.8 -> v0.1.12 Adding equivalent v1.0.1 Updating errno v0.3.1 -> v0.3.3 Adding event-listener v3.0.0 Updating fancy-regex v0.7.1 -> v0.11.0 Adding fastrand v2.0.1 Adding fdeflate v0.3.0 Updating flate2 v1.0.25 -> v1.0.27 Updating form_urlencoded v1.1.0 -> v1.2.0 Updating getrandom v0.2.9 -> v0.2.10 Updating gimli v0.27.2 -> v0.28.0 Updating glutin v0.30.8 -> v0.30.10 Updating glutin_egl_sys v0.5.0 -> v0.5.1 Updating gpu-descriptor v0.2.3 -> v0.2.4 Updating gpu-descriptor-types v0.1.1 -> v0.1.2 Adding hashbrown v0.14.0 Updating hermit-abi v0.3.1 -> v0.3.3 Updating iana-time-zone v0.1.56 -> v0.1.57 Updating idna v0.3.0 -> v0.4.0 Updating image v0.24.6 -> v0.24.7 Adding indexmap v2.0.0 Updating io-lifetimes v1.0.10 -> v1.0.11 Updating is-terminal v0.4.7 -> v0.4.9 Updating itoa v1.0.6 -> v1.0.9 Updating libc v0.2.144 -> v0.2.148 Adding linux-raw-sys v0.4.7 Updating lock_api v0.4.9 -> v0.4.10 Updating log v0.4.17 -> v0.4.20 Updating memchr v2.5.0 -> v2.6.3 Adding memoffset v0.7.1 Updating miniz_oxide v0.6.2 -> v0.7.1 Updating mio v0.8.6 -> v0.8.8 Adding nix v0.26.4 Updating num-traits v0.2.15 -> v0.2.16 Adding num_enum v0.6.1 Adding num_enum_derive v0.6.1 Updating object v0.30.3 -> v0.32.1 Updating once_cell v1.17.1 -> v1.18.0 Updating orbclient v0.3.45 -> v0.3.46 Updating os_str_bytes v6.5.0 -> v6.5.1 Updating parking v2.1.0 -> v2.1.1 Updating parking_lot_core v0.9.7 -> v0.9.8 Updating paste v1.0.12 -> v1.0.14 Updating percent-encoding v2.2.0 -> v2.3.0 Updating pin-project-lite v0.2.9 -> v0.2.13 Adding piper v0.2.1 Updating plist v1.4.0 -> v1.5.0 Updating png v0.17.7 -> v0.17.10 Updating prettyplease v0.2.5 -> v0.2.15 Updating proc-macro2 v1.0.58 -> v1.0.67 Updating profiling v1.0.8 -> v1.0.11 Updating quick-xml v0.26.0 -> v0.29.0 Updating quote v1.0.27 -> v1.0.33 Updating regex v1.8.2 -> v1.9.5 Adding regex-automata v0.3.8 Removing regex-syntax v0.6.29 Removing regex-syntax v0.7.2 Adding regex-syntax v0.7.5 Updating ron v0.8.0 -> v0.8.1 Removing rustix v0.37.19 Adding rustix v0.37.23 Adding rustix v0.38.14 Updating rustls v0.20.8 -> v0.21.7 Adding rustls-webpki v0.100.3 Adding rustls-webpki v0.101.6 Updating ryu v1.0.13 -> v1.0.15 Updating scopeguard v1.1.0 -> v1.2.0 Updating serde v1.0.163 -> v1.0.188 Updating serde_derive v1.0.163 -> v1.0.188 Updating serde_json v1.0.96 -> v1.0.107 Updating serde_repr v0.1.12 -> v0.1.16 Updating serde_spanned v0.6.2 -> v0.6.3 Updating sha1 v0.10.5 -> v0.10.6 Updating shlex v1.1.0 -> v1.2.0 Adding signal-hook-registry v1.4.1 Adding simd-adler32 v0.3.7 Updating siphasher v0.3.10 -> v0.3.11 Updating slab v0.4.8 -> v0.4.9 Updating smallvec v1.10.0 -> v1.11.1 Updating smithay-client-toolkit v0.16.0 -> v0.16.1 Updating strict-num v0.1.0 -> v0.1.1 Updating syn v2.0.16 -> v2.0.37 Updating syntect v5.0.0 -> v5.1.0 Updating system-deps v6.1.0 -> v6.1.1 Updating target-lexicon v0.12.7 -> v0.12.11 Updating tempfile v3.5.0 -> v3.8.0 Updating termcolor v1.2.0 -> v1.3.0 Updating thiserror v1.0.40 -> v1.0.49 Updating thiserror-impl v1.0.40 -> v1.0.49 Removing time v0.1.45 Removing time v0.3.21 Adding time v0.3.29 Updating time-core v0.1.1 -> v0.1.2 Updating time-macros v0.2.9 -> v0.2.15 Updating toml v0.7.4 -> v0.7.8 Updating toml_datetime v0.6.2 -> v0.6.3 Updating toml_edit v0.19.9 -> v0.19.15 Updating tracing-attributes v0.1.24 -> v0.1.26 Updating ttf-parser v0.19.0 -> v0.19.2 Updating tts v0.25.5 -> v0.25.6 Updating typenum v1.16.0 -> v1.17.0 Updating unicode-ident v1.0.8 -> v1.0.12 Updating unicode-width v0.1.10 -> v0.1.11 Updating ureq v2.6.2 -> v2.7.1 Updating url v2.3.1 -> v2.4.1 Updating waker-fn v1.1.0 -> v1.1.1 Updating walkdir v2.3.3 -> v2.4.0 Removing wasi v0.10.0+wasi-snapshot-preview1 Updating wasm-bindgen-futures v0.4.36 -> v0.4.37 Updating webbrowser v0.8.10 -> v0.8.11 Removing webpki v0.22.1 Updating webpki-roots v0.22.6 -> v0.23.1 Updating which v4.4.0 -> v4.4.2 Updating winapi-util v0.1.5 -> v0.1.6 Adding windows v0.51.1 Adding windows-core v0.51.1 Updating windows-implement v0.44.0 -> v0.48.0 Updating windows-interface v0.44.0 -> v0.48.0 Updating windows-targets v0.48.0 -> v0.48.5 Updating windows_aarch64_gnullvm v0.48.0 -> v0.48.5 Updating windows_aarch64_msvc v0.48.0 -> v0.48.5 Updating windows_i686_gnu v0.48.0 -> v0.48.5 Updating windows_i686_msvc v0.48.0 -> v0.48.5 Updating windows_x86_64_gnu v0.48.0 -> v0.48.5 Updating windows_x86_64_gnullvm v0.48.0 -> v0.48.5 Updating windows_x86_64_msvc v0.48.0 -> v0.48.5 Updating winnow v0.4.6 -> v0.5.15 Adding xdg-home v1.0.0 Updating xml-rs v0.8.15 -> v0.8.19 Updating zbus v3.10.0 -> v3.14.1 Updating zbus_macros v3.10.0 -> v3.14.1 Updating zbus_names v2.5.1 -> v2.6.0 Updating zvariant v3.14.0 -> v3.15.0 Updating zvariant_derive v3.14.0 -> v3.15.0 ❯ cargo update -p ureq --precise 2.6.2 Updating crates.io index Downgrading rustls v0.21.7 -> v0.20.9 Removing rustls-webpki v0.100.3 Removing rustls-webpki v0.101.6 Downgrading ureq v2.7.1 -> v2.6.2 Adding webpki v0.22.1 Downgrading webpki-roots v0.23.1 -> v0.22.6 ❯ cargo update -p plist --precise 1.4.0 Updating crates.io index Downgrading plist v1.5.0 -> v1.4.0 Downgrading quick-xml v0.29.0 -> v0.26.0 ❯ cargo update -p ron --precise 0.8.0 Updating crates.io index Removing base64 v0.21.4 Downgrading ron v0.8.1 -> v0.8.0 * Remove unnecessary mut * Silence over-eager clippy * Add misisng `'static` lifetime to `run_simple_native` * ❯ cargo update -p android-activity --precise 0.4.1 Updating crates.io index Downgrading android-activity v0.4.2 -> v0.4.1 Removing num_enum v0.6.1 Removing num_enum_derive v0.6.1
1 year ago
# TODO(emilk): enable more of these lints:
"clippy::cloned_instead_of_copied",
"clippy::let_underscore_untyped",
"clippy::missing_assert_message",
"clippy::missing_errors_doc",
"clippy::print_stderr", # TODO(emilk): use `log` crate instead
"clippy::self_named_module_files", # False positives
"clippy::too_many_lines",
"clippy::undocumented_unsafe_blocks",
"clippy::unwrap_used",
"clippy::useless_let_if_seq", # False positives
"clippy::wildcard_imports", # We do this a lot
"trivial_casts",
"unused_qualifications",
]