-
Notifications
You must be signed in to change notification settings - Fork 2
skip compiling C++ code when running clippy #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
newer clippy and deny versions broke stuff... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or CLIPPY or CARGO_CFG_CLIPPY ? How did you choose that one?
I've added this to the build script: let vars = std::env::vars().collect::<Vec<_>>();
panic!("vars: {vars:#?}"); Which printed only the following (
"CARGO_ENCODED_RUSTFLAGS",
"-C\u{1f}link-arg=-fuse-ld=mold\u{1f}-Dunsafe_code\u{1f}-Wclippy::all\u{1f}-Wclippy::await_holding_lock\u{1f}-Wclippy::char_lit_as_u8\u{1f}-Wclippy::checked_conversions\u{1f}-Wclippy::dbg_macro\u{1f}-Wclippy::debug_assert_with_mut_call\u{1f}-Wclippy::doc_markdown\u{1f}-Wclippy::empty_enum\u{1f}-Wclippy::enum_glob_use\u{1f}-Wclippy::exit\u{1f}-Wclippy::expl_impl_clone_on_copy\u{1f}-Wclippy::explicit_deref_methods\u{1f}-Wclippy::explicit_into_iter_loop\u{1f}-Wclippy::fallible_impl_from\u{1f}-Wclippy::filter_map_next\u{1f}-Wclippy::flat_map_option\u{1f}-Wclippy::float_cmp_const\u{1f}-Wclippy::fn_params_excessive_bools\u{1f}-Wclippy::from_iter_instead_of_collect\u{1f}-Wclippy::if_let_mutex\u{1f}-Wclippy::implicit_clone\u{1f}-Wclippy::imprecise_flops\u{1f}-Wclippy::inefficient_to_string\u{1f}-Wclippy::invalid_upcast_comparisons\u{1f}-Wclippy::large_digit_groups\u{1f}-Wclippy::large_stack_arrays\u{1f}-Wclippy::large_types_passed_by_value\u{1f}-Wclippy::let_unit_value\u{1f}-Wclippy::linkedlist\u{1f}-Wclippy::lossy_float_literal\u{1f}-Wclippy::macro_use_imports\u{1f}-Wclippy::manual_ok_or\u{1f}-Wclippy::map_err_ignore\u{1f}-Wclippy::map_flatten\u{1f}-Wclippy::map_unwrap_or\u{1f}-Wclippy::indexing_slicing\u{1f}-Wclippy::match_same_arms\u{1f}-Wclippy::match_wild_err_arm\u{1f}-Wclippy::match_wildcard_for_single_variants\u{1f}-Wclippy::mem_forget\u{1f}-Wclippy::missing_enforced_import_renames\u{1f}-Wclippy::mut_mut\u{1f}-Wclippy::mutex_integer\u{1f}-Wclippy::needless_borrow\u{1f}-Wclippy::needless_continue\u{1f}-Wclippy::needless_for_each\u{1f}-Wclippy::option_option\u{1f}-Wclippy::path_buf_push_overwrite\u{1f}-Wclippy::ptr_as_ptr\u{1f}-Wclippy::rc_mutex\u{1f}-Wclippy::ref_option_ref\u{1f}-Wclippy::rest_pat_in_fully_bound_structs\u{1f}-Wclippy::same_functions_in_if_condition\u{1f}-Wclippy::semicolon_if_nothing_returned\u{1f}-Wclippy::single_match_else\u{1f}-Wclippy::string_add_assign\u{1f}-Wclippy::string_add\u{1f}-Wclippy::string_lit_as_bytes\u{1f}-Wclippy::string_to_string\u{1f}-Wclippy::todo\u{1f}-Wclippy::trait_duplication_in_bounds\u{1f}-Wclippy::unimplemented\u{1f}-Wclippy::unnested_or_patterns\u{1f}-Wclippy::unused_self\u{1f}-Wclippy::useless_transmute\u{1f}-Wclippy::verbose_file_reads\u{1f}-Wclippy::zero_sized_map_values\u{1f}-Wfuture_incompatible\u{1f}-Wnonstandard_style\u{1f}-Wrust_2018_idioms\u{1f}-C\u{1f}link-arg=-fuse-ld=lld",
),
(
"CLIPPY_ARGS",
"",
),
(
"CLIPPY_TERMINAL_WIDTH",
"203",
),
(
"RUSTC_WORKSPACE_WRAPPER",
"/home/firestar99/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver",
), Could (also rebased it) |
How about using https://doc.rust-lang.org/nightly/clippy/configuration.html#disabling-evaluation-of-certain-code |
This works as well and is probably a lot cleaner than my solution. Feel free to merge. As discussed, once merged I'll release version 0.12.1 so we can start using it in rust-gpu. |
Requires #17