Skip to content

Commit 7e1f4b2

Browse files
committed
chore: Shorten Clippy allowance reasons
1 parent 3296bc6 commit 7e1f4b2

4 files changed

Lines changed: 14 additions & 53 deletions

File tree

‎src/config/unit_test/mod.rs‎

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ pub struct UnitTestResult {
6767

6868
impl UnitTest {
6969
// https://github.com/vectordotdev/vector/issues/23659
70-
#[allow(
71-
clippy::missing_panics_doc,
72-
reason = "Audit and document the existing panic conditions separately from lint enforcement."
73-
)]
70+
#[allow(clippy::missing_panics_doc, reason = "Panic documentation deferred")]
7471
pub async fn run(self) -> UnitTestResult {
7572
let diff = config::ConfigDiff::initial(&self.config);
7673
let (topology, _) = RunningTopology::start_validated(self.config, diff, self.pieces)
@@ -110,10 +107,7 @@ fn init_log_schema_from_paths(
110107
}
111108

112109
// https://github.com/vectordotdev/vector/issues/23659
113-
#[allow(
114-
clippy::missing_errors_doc,
115-
reason = "Audit and document the existing error contracts separately from lint enforcement."
116-
)]
110+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
117111
pub async fn build_unit_tests_main(
118112
paths: &[ConfigPath],
119113
signal_handler: &mut signal::SignalHandler,
@@ -134,10 +128,7 @@ pub async fn build_unit_tests_main(
134128
}
135129

136130
// https://github.com/vectordotdev/vector/issues/23659
137-
#[allow(
138-
clippy::missing_errors_doc,
139-
reason = "Audit and document the existing error contracts separately from lint enforcement."
140-
)]
131+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
141132
pub async fn build_unit_tests(
142133
mut config_builder: ConfigBuilder,
143134
) -> Result<Vec<UnitTest>, Vec<String>> {
@@ -190,14 +181,8 @@ pub struct UnitTestBuildMetadata {
190181

191182
impl UnitTestBuildMetadata {
192183
// https://github.com/vectordotdev/vector/issues/23659
193-
#[allow(
194-
clippy::missing_errors_doc,
195-
reason = "Audit and document the existing error contracts separately from lint enforcement."
196-
)]
197-
#[allow(
198-
clippy::missing_panics_doc,
199-
reason = "Audit and document the existing panic conditions separately from lint enforcement."
200-
)]
184+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
185+
#[allow(clippy::missing_panics_doc, reason = "Panic documentation deferred")]
201186
pub fn initialize(config_builder: &mut ConfigBuilder) -> Result<Self, Vec<String>> {
202187
// A unique id used to name test sources and sinks to avoid name clashes
203188
let random_id = Uuid::new_v4().to_string();
@@ -262,14 +247,8 @@ impl UnitTestBuildMetadata {
262247

263248
/// Convert test inputs into sources for use in a unit testing topology
264249
// https://github.com/vectordotdev/vector/issues/23659
265-
#[allow(
266-
clippy::missing_errors_doc,
267-
reason = "Audit and document the existing error contracts separately from lint enforcement."
268-
)]
269-
#[allow(
270-
clippy::missing_panics_doc,
271-
reason = "Audit and document the existing panic conditions separately from lint enforcement."
272-
)]
250+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
251+
#[allow(clippy::missing_panics_doc, reason = "Panic documentation deferred")]
273252
pub fn hydrate_into_sources(
274253
&self,
275254
inputs: &[TestInput],
@@ -304,14 +283,8 @@ impl UnitTestBuildMetadata {
304283

305284
/// Convert test outputs into sinks for use in a unit testing topology
306285
// https://github.com/vectordotdev/vector/issues/23659
307-
#[allow(
308-
clippy::missing_errors_doc,
309-
reason = "Audit and document the existing error contracts separately from lint enforcement."
310-
)]
311-
#[allow(
312-
clippy::missing_panics_doc,
313-
reason = "Audit and document the existing panic conditions separately from lint enforcement."
314-
)]
286+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
287+
#[allow(clippy::missing_panics_doc, reason = "Panic documentation deferred")]
315288
pub fn hydrate_into_sinks(
316289
&self,
317290
test_name: &str,
@@ -609,7 +582,7 @@ pub(super) struct BuiltOutput {
609582
// https://github.com/vectordotdev/vector/issues/23659
610583
#[allow(
611584
clippy::default_trait_access,
612-
reason = "Keep inferred defaults where concrete type names need a separate import or API cleanup."
585+
reason = "Preserve inferred default types"
613586
)]
614587
fn build_outputs(
615588
test_outputs: &[TestOutput],

‎src/config/unix.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ impl<T> UnixOnly<T> {
4444
/// compiled on other targets. Context is accepted on every target and is
4545
/// dropped, together with the configuration, if Unix is unavailable.
4646
// https://github.com/vectordotdev/vector/issues/23659
47-
#[allow(
48-
clippy::missing_errors_doc,
49-
reason = "Audit and document the existing error contracts separately from lint enforcement."
50-
)]
47+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
5148
pub fn on_unix<C, R>(
5249
self,
5350
context: C,

‎src/config/validation.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ pub fn check_names<'a, I: Iterator<Item = &'a ComponentKey>>(names: I) -> Result
9191
}
9292

9393
// https://github.com/vectordotdev/vector/issues/23659
94-
#[allow(
95-
clippy::items_after_statements,
96-
reason = "Keep the existing local helper placement until its surrounding function is refactored."
97-
)]
94+
#[allow(clippy::items_after_statements, reason = "Helper relocation deferred")]
9895
pub fn check_shape(config: &ConfigBuilder) -> Result<(), Vec<String>> {
9996
let mut errors = vec![];
10097

‎src/config/watcher.rs‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,8 @@ impl Watcher {
7171
/// Has best effort guarantee of detecting all file changes from the end of
7272
/// this function until the main thread stops.
7373
// https://github.com/vectordotdev/vector/issues/23659
74-
#[allow(
75-
clippy::missing_errors_doc,
76-
reason = "Audit and document the existing error contracts separately from lint enforcement."
77-
)]
78-
#[allow(
79-
clippy::too_many_lines,
80-
reason = "Keep the existing control flow intact during the lint rollout."
81-
)]
74+
#[allow(clippy::missing_errors_doc, reason = "Error documentation deferred")]
75+
#[allow(clippy::too_many_lines, reason = "Preserve existing control flow")]
8276
pub fn spawn_thread<'a>(
8377
watcher_conf: WatcherConfig,
8478
signal_tx: crate::signal::SignalTx,

0 commit comments

Comments
 (0)