Skip to content

chore(clippy): add workspace lints string_slice, await_holding_lock, let_underscore_must_use#25668

Closed
pront wants to merge 1 commit into
masterfrom
pavlos/workspace-clippy-lints
Closed

chore(clippy): add workspace lints string_slice, await_holding_lock, let_underscore_must_use#25668
pront wants to merge 1 commit into
masterfrom
pavlos/workspace-clippy-lints

Conversation

@pront

@pront pront commented Jun 23, 2026

Copy link
Copy Markdown
Member

@github-actions github-actions Bot added domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: sinks Anything related to the Vector's sinks labels Jun 23, 2026
@datadog-vectordotdev

This comment has been minimized.

@pront pront added no-changelog Changes in this PR do not need user-facing explanations in the release changelog type: tech debt A code change that does not add user value. labels Jun 23, 2026
@pront pront marked this pull request as ready for review June 23, 2026 19:23
@pront pront requested a review from a team as a code owner June 23, 2026 19:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08b65a29e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/sinks/influxdb/mod.rs Outdated
Comment thread Cargo.toml Outdated
…let_underscore_must_use

Adds three opt-in clippy lints to [workspace.lints.clippy] so they apply
across all workspace crates:

- string_slice: catches &str[n..] byte-index slicing that can panic on
  multi-byte UTF-8 boundaries (the direct cause of the bug fixed in #25582)
- await_holding_lock: catches .await while holding a MutexGuard (potential
  deadlock)
- let_underscore_must_use: catches let _ = expr where expr has a #[must_use]
  type or return value

All existing violations are resolved: real fixes preferred (strip_prefix,
split_once, split_at, .ok()), with targeted #[expect] or #![allow] reserved
for provably-safe patterns (regex/find() indices, Derivative macro false
positives) and one genuine unavoidable case (kinesis partition_key truncation
via floor_char_boundary).

Also fixes a latent panic in aws_kinesis sink: partition_key[..256] could
panic on multi-byte keys; replaced with floor_char_boundary(256).
@pront pront force-pushed the pavlos/workspace-clippy-lints branch from f224db7 to e3640eb Compare June 23, 2026 20:09
@pront pront requested a review from a team as a code owner June 23, 2026 20:09
@github-actions github-actions Bot added domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: vdev Anything related to the vdev tooling labels Jun 23, 2026
@pront pront closed this Jun 23, 2026
@pront pront deleted the pavlos/workspace-clippy-lints branch June 23, 2026 20:09
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: sinks Anything related to the Vector's sinks domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: vdev Anything related to the vdev tooling no-changelog Changes in this PR do not need user-facing explanations in the release changelog type: tech debt A code change that does not add user value.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant