@@ -213,123 +213,126 @@ zstd = { version = "0.13", default-features = false }
213213# See https://github.com/apache/datafusion/issues/18467 for the ongoing effort of
214214# picking useful non-default lints.
215215[workspace .lints .clippy ]
216+ all = { level = " warn" , priority = -1 }
217+ pedantic = { level = " warn" , priority = -1 }
218+
216219# https://github.com/apache/datafusion/issues/18881
217220allow_attributes = " warn"
218221as_ptr_cast_mut = " warn"
219- assigning_clones = " warn"
220- bool_to_int_with_if = " warn"
221222branches_sharing_code = " warn"
222- checked_conversions = " warn"
223223clear_with_drain = " warn"
224224coerce_container_to_any = " warn"
225225debug_assert_with_mut_call = " warn"
226- decimal_bitwise_operands = " warn"
227226default_union_representation = " warn"
228227doc_include_without_cfg = " warn"
229- duration_suboptimal_units = " warn"
230- elidable_lifetime_names = " warn"
231228empty_enum_variants_with_brackets = " warn"
232- empty_enums = " warn"
233229equatable_if_let = " warn"
234230exit = " warn"
235- expl_impl_clone_on_copy = " warn"
236- explicit_deref_methods = " warn"
237- filter_map_next = " warn"
238- flat_map_option = " warn"
239- fn_params_excessive_bools = " warn"
240231fn_to_numeric_cast_any = " warn"
241- ignore_without_reason = " warn"
242232imprecise_flops = " warn"
243- inconsistent_struct_constructor = " warn"
244- index_refutable_slice = " warn"
245- inefficient_to_string = " warn"
246233infinite_loop = " warn"
247- into_iter_without_iter = " warn"
248- invalid_upcast_comparisons = " warn"
249- ip_constant = " warn"
250- iter_filter_is_ok = " warn"
251- iter_filter_is_some = " warn"
252- iter_not_returning_iterator = " warn"
253234iter_on_empty_collections = " warn"
254235iter_on_single_items = " warn"
255- iter_without_into_iter = " warn"
256- # Detects large stack-allocated futures that may cause stack overflow crashes (see threshold in clippy.toml)
257- large_futures = " warn"
258236large_include_file = " warn"
259- # Like `large_futures`, these guard against stack overflows
260- large_stack_arrays = " warn"
237+ # Guards against stack overflows
261238large_stack_frames = " warn"
262- large_types_passed_by_value = " warn"
263- linkedlist = " warn"
264239# Catches `"{foo}"` where the string is never actually formatted
265240literal_string_with_formatting_args = " warn"
266- macro_use_imports = " warn"
267- manual_assert = " warn"
268- manual_ilog2 = " warn"
269- manual_instant_elapsed = " warn"
270- manual_is_power_of_two = " warn"
271- manual_is_variant_and = " warn"
272- # `(a + b) / 2` can overflow; `a.midpoint(b)` cannot
273- manual_midpoint = " warn"
274- match_wild_err_arm = " warn"
275241mem_forget = " warn"
276- mismatching_type_param_order = " warn"
277- mut_mut = " warn"
278- # https://github.com/apache/datafusion/issues/18503
279- needless_pass_by_value = " warn"
280242needless_type_cast = " warn"
281243negative_feature_names = " warn"
282- # Prefer `std::sync::LazyLock` over the `lazy_static`/`once_cell` crates
283- non_std_lazy_statics = " warn"
284244non_zero_suggestions = " warn"
285245nonstandard_macro_braces = " warn"
286- option_as_ref_cloned = " warn"
287- option_option = " warn"
288246or_fun_call = " warn"
289247path_buf_push_overwrite = " warn"
290248pathbuf_init_then_push = " warn"
291249precedence_bits = " warn"
292- ptr_cast_constness = " warn"
293- pub_underscore_fields = " warn"
294250pub_without_shorthand = " warn"
295251rc_mutex = " warn"
296- ref_as_ptr = " warn"
297- ref_option_ref = " warn"
298252rest_pat_in_fully_bound_structs = " warn"
299- # Catches copy-paste bugs in `if`/`else if` chains
300- same_functions_in_if_condition = " warn"
301- same_length_and_capacity = " warn"
302- # Catches a `&self` argument that is only threaded through recursive calls
303- self_only_used_in_recursion = " warn"
304253# Avoids hashing the key twice
305254set_contains_or_insert = " warn"
306255single_option_map = " warn"
307- str_split_at_newline = " warn"
308- string_add_assign = " warn"
309256string_lit_as_bytes = " warn"
310257string_lit_chars_any = " warn"
311258suspicious_xor_used_as_pow = " warn"
312259trailing_empty_array = " warn"
313260trait_duplication_in_bounds = " warn"
314- transmute_ptr_to_ptr = " warn"
315- # Subtracting `Instant`s panics on overflow; use `saturating_duration_since`
316- unchecked_time_subtraction = " warn"
317261uninhabited_references = " warn"
318- uninlined_format_args = " warn"
319- unnecessary_box_returns = " warn"
320- # `{:?}` on a `Path` quotes and escapes it; `{}` on `.display()` does not
321- unnecessary_debug_formatting = " warn"
322- unnecessary_lazy_evaluations = " warn"
323262unnecessary_safety_doc = " warn"
324263unnecessary_self_imports = " warn"
325264unnecessary_struct_initialization = " warn"
326- unused_async = " warn"
327265unused_peekable = " warn"
328266unused_rounding = " warn"
329- used_underscore_binding = " warn"
330267verbose_file_reads = " warn"
331268wildcard_dependencies = " warn"
332- zero_sized_map_values = " warn"
269+
270+ # Pedantic lints we opt out of, with the number of hits at the time we enabled `pedantic`.
271+ # Some of these we should consider enabling.
272+ borrow_as_ptr = " allow" # 6 hits
273+ case_sensitive_file_extension_comparisons = " allow" # 1 hit
274+ cast_lossless = " allow" # 361 hits
275+ cast_possible_truncation = " allow" # 911 hits
276+ cast_possible_wrap = " allow" # 493 hits
277+ cast_precision_loss = " allow" # 266 hits
278+ cast_ptr_alignment = " allow" # 5 hits
279+ cast_sign_loss = " allow" # 440 hits
280+ cloned_instead_of_copied = " allow" # 38 hits
281+ default_trait_access = " allow" # 221 hits
282+ doc_comment_double_space_linebreaks = " allow" # 6 hits
283+ doc_link_with_quotes = " allow" # 25 hits
284+ doc_markdown = " allow" # 4933 hits; needs a long `doc-valid-idents` list in `clippy.toml`
285+ enum_glob_use = " allow" # 98 hits
286+ explicit_into_iter_loop = " allow" # 55 hits
287+ explicit_iter_loop = " allow" # 189 hits
288+ float_cmp = " allow" # 8 hits; exact float comparisons are often intentional here
289+ format_collect = " allow" # 4 hits
290+ format_push_string = " allow" # 34 hits
291+ from_iter_instead_of_collect = " allow" # 51 hits
292+ if_not_else = " allow" # 133 hits
293+ ignored_unit_patterns = " allow" # 52 hits
294+ implicit_clone = " allow" # 198 hits
295+ implicit_hasher = " allow" # 17 hits
296+ inline_always = " allow" # 45 hits
297+ items_after_statements = " allow" # 171 hits
298+ large_digit_groups = " allow" # 3 hits
299+ manual_string_new = " allow" # 84 hits
300+ many_single_char_names = " allow" # 12 hits; short names are idiomatic in the numeric kernels
301+ map_unwrap_or = " allow" # 198 hits
302+ match_bool = " allow" # 46 hits
303+ match_same_arms = " allow" # 261 hits
304+ match_wildcard_for_single_variants = " allow" # 132 hits
305+ missing_errors_doc = " allow" # 1807 hits
306+ missing_fields_in_debug = " allow" # 29 hits
307+ missing_panics_doc = " allow" # 244 hits
308+ must_use_candidate = " allow" # 2726 hits
309+ needless_bitwise_bool = " allow" # 1 hit
310+ needless_continue = " allow" # 37 hits
311+ needless_raw_string_hashes = " allow" # 540 hits
312+ no_effect_underscore_binding = " allow" # 1 hit
313+ ptr_as_ptr = " allow" # 83 hits
314+ redundant_closure_for_method_calls = " allow" # 686 hits
315+ redundant_else = " allow" # 48 hits
316+ ref_option = " allow" # 36 hits
317+ return_self_not_must_use = " allow" # 644 hits
318+ semicolon_if_nothing_returned = " allow" # 1353 hits
319+ similar_names = " allow" # 228 hits; too many false positives, e.g. `expr`/`exprs`
320+ single_char_pattern = " allow" # 23 hits
321+ single_match_else = " allow" # 155 hits
322+ struct_excessive_bools = " allow" # 24 hits
323+ struct_field_names = " allow" # 14 hits
324+ too_many_lines = " allow" # 484 hits
325+ trivially_copy_pass_by_ref = " allow" # 74 hits
326+ unicode_not_nfc = " allow" # 2 hits
327+ unnecessary_literal_bound = " allow" # 471 hits
328+ unnecessary_semicolon = " allow" # 185 hits
329+ unnecessary_trailing_comma = " allow" # 49 hits
330+ unnecessary_wraps = " allow" # 427 hits
331+ unnested_or_patterns = " allow" # 68 hits
332+ unreadable_literal = " allow" # 502 hits
333+ unused_self = " allow" # 69 hits
334+ used_underscore_items = " allow" # 28 hits
335+ wildcard_imports = " allow" # 48 hits; `use crate::prelude::*` is idiomatic
333336
334337[workspace .lints .rust ]
335338unexpected_cfgs = { level = " warn" , check-cfg = [
0 commit comments