-
Notifications
You must be signed in to change notification settings - Fork 0
Enforce strict clippy lint policy #71
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: SBALAVIGNESH123/OmniKV
Length of output: 32228
🏁 Script executed:
Repository: SBALAVIGNESH123/OmniKV
Length of output: 461
🌐 Web query:
Rust #[expect] lint attribute multiple occurrences same scope suppresses all occurrences documentation💡 Result:
In Rust, the #[expect(...)] attribute creates a specific expectation for a lint. Each occurrence of an #[expect] attribute creates its own, independent lint expectation [1][2]. When you use multiple #[expect] attributes for the same lint in the same scope, they do not collectively suppress all instances of that lint; rather, each individual #[expect] attribute requires its own corresponding lint emission to be "fulfilled" [1][2]. Key aspects of this behavior include: 1. Independent Fulfillment: Each #[expect] attribute maintains its own state [1][2]. If you apply #[expect(lint_a)] twice in the same scope, the compiler expects lint_a to be emitted twice [1][2]. If the lint is only emitted once, one of the expectations will remain unfulfilled [1][2]. 2. Unfulfilled Expectations: If an expectation is not met because the expected lint is not triggered, the compiler emits the unfulfilled_lint_expectations diagnostic at the location of the #[expect] attribute [1][3]. 3. Multiple Lints: If a single #[expect] attribute contains multiple lints (e.g., #[expect(lint_a, lint_b)]), it creates separate expectations for each lint [1][2]. Each of these must be fulfilled individually [1][2]. 4. Lint Groups: If you expect a lint group (e.g., #[expect(unused)]), the expectation is fulfilled if at least one lint within that group is emitted [1][2]. In summary, because each #[expect] attribute creates a unique expectation, providing multiple attributes for the same lint essentially requires that lint to be triggered multiple times to satisfy all expectations [1][2]. If the code does not trigger the lint as many times as you have expectations, you will receive warnings for the unfulfilled expectations [1][3].
Citations:
🌐 Web query:
site:doc.rust-lang.org#[expect]lint occurrences scope💡 Result:
In Rust, the #[expect(lint_name)] attribute functions as a lint level that suppresses a specific lint emission while simultaneously requiring that the lint actually be triggered within the associated scope [1][2][3]. Key details regarding its scope and behavior: 1. Scope: The #[expect] attribute applies to the entity it is attached to (e.g., a function, block, or statement), similar to other lint attributes like #[allow] or #[deny] [2][3]. It creates a lint expectation specifically for that location [3][4]. 2. Fulfillment: The expectation is considered fulfilled if the specified lint would have been emitted at that exact location (i.e., if it would have been triggered under a #[warn(lint_name)] setting) [3][4]. 3. Unfulfilled Expectations: If the expected lint is not triggered within the scope where the attribute is applied, the compiler emits the unfulfilled_lint_expectations lint [2][3][5]. This serves as a safeguard to ensure that you are not suppressing lints that are no longer relevant to your code [2]. 4. Interaction with Other Levels: If the lint level is modified within the same scope using other attributes like #[allow] or #[warn], the lint emission is handled according to those attributes, and the expectation typically remains unfulfilled [3][4]. 5. Independence: If an #[expect] attribute contains multiple lints, each lint is evaluated independently [3][4]. For lint groups, the expectation is fulfilled if at least one lint within that group is triggered [3][4]. Essentially, #[expect] is a safer alternative to #[allow] for scenarios where you want to suppress a warning but want to be alerted if the underlying issue being suppressed is no longer present [2][6].
Citations:
🏁 Script executed:
Repository: SBALAVIGNESH123/OmniKV
Length of output: 407
Scope these
#![expect]attributes to the specific tests. File-level expectations still suppress the listed lints anywhere else in the integration-test crate, so a new occurrence in the same file can slip past the gate as long as one existing occurrence remains. Move each expectation onto the affected function or block incrates/omnikv-engine/tests/durability_evidence.rs,debug_compaction.rs,debug_compaction_200.rs,debug_reopen.rs,operations.rs,ops_maturity.rs, andpanic_policy_audit.rs.📍 Affects 7 files
crates/omnikv-engine/tests/durability_evidence.rs#L1-L7(this comment)crates/omnikv-engine/tests/debug_compaction.rs#L1-L5crates/omnikv-engine/tests/debug_compaction_200.rs#L1-L5crates/omnikv-engine/tests/debug_reopen.rs#L1-L5crates/omnikv-engine/tests/operations.rs#L1-L7crates/omnikv-engine/tests/ops_maturity.rs#L6-L12crates/omnikv-engine/tests/panic_policy_audit.rs#L6-L14🤖 Prompt for AI Agents