Repository navigation
Expand file tree
/
Copy pathclippy.toml
More file actions
34 lines (29 loc) · 2.24 KB
/
Copy pathclippy.toml
File metadata and controls
34 lines (29 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: See the NOTICE file distributed with this work for additional information regarding copyright ownership
# SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements
disallowed-methods = [
{ path = "tokio::task::spawn", reason = "To provide cancel-safety, use `SpawnedTask::spawn` instead (https://github.com/apache/datafusion/issues/6513)" },
{ path = "tokio::task::spawn_blocking", reason = "To provide cancel-safety, use `SpawnedTask::spawn_blocking` instead (https://github.com/apache/datafusion/issues/6513)" },
{ path = "arrow_array::array::AnyDictionaryArray::with_values", reason = "Running code on every dictionary value can cost far more than the batch has rows; use `datafusion_common::utils::map_dictionary_values`" },
{ path = "arrow_array::array::DictionaryArray::with_values", reason = "Running code on every dictionary value can cost far more than the batch has rows; use `datafusion_common::utils::map_dictionary_values`" },
{ path = "std::vec::Vec::reserve", reason = "Use `Vec::try_reserve` so allocation failures can be reported instead of panicking", replacement = "try_reserve" },
]
disallowed-types = [
{ path = "std::time::Instant", reason = "Use `datafusion_common::instant::Instant` instead for WASM compatibility" },
]
# Lowering the threshold to help prevent stack overflows (default is 16384)
# See: https://rust-lang.github.io/rust-clippy/master/index.html#/large_futures
future-size-threshold = 10000
# Be more aware of large error variants which can impact the "happy path" due
# to large stack footprint when considering async state machines (default is 128).
#
# Value of 70 picked arbitrarily as something less than 100.
#
# See:
# - https://github.com/apache/datafusion/issues/16652
# - https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
large-error-threshold = 70
# `DFSchema` caches a name index in a `OnceLock`, which is excluded from its
# `Hash` and `Eq`, so plans and expressions containing it are safe hash keys.
# See: https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type
ignore-interior-mutability = ["bytes::Bytes", "datafusion_common::DFSchema"]