Skip to content
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

Use workspace Clippy lints in benchmarks #16804

Closed
BD103 opened this issue Dec 13, 2024 · 0 comments · Fixed by #16808
Closed

Use workspace Clippy lints in benchmarks #16804

BD103 opened this issue Dec 13, 2024 · 0 comments · Fixed by #16808
Labels
C-Benchmarks Stress tests and benchmarks used to measure how fast things are D-Straightforward Simple bug fixes and API improvements, docs, test and examples

Comments

@BD103
Copy link
Member

BD103 commented Dec 13, 2024

Our benchmarks are slightly out of date, and as such fail quite a few Clippy lints. We should copy over [our lint configuration] and fix any warnings:

bevy/Cargo.toml

Lines 33 to 61 in 00722b8

[workspace.lints.clippy]
doc_markdown = "warn"
manual_let_else = "warn"
match_same_arms = "warn"
redundant_closure_for_method_calls = "warn"
redundant_else = "warn"
semicolon_if_nothing_returned = "warn"
type_complexity = "allow"
undocumented_unsafe_blocks = "warn"
unwrap_or_default = "warn"
needless_lifetimes = "allow"
ptr_as_ptr = "warn"
ptr_cast_constness = "warn"
ref_as_ptr = "warn"
# see: https://github.com/bevyengine/bevy/pull/15375#issuecomment-2366966219
too_long_first_doc_paragraph = "allow"
std_instead_of_core = "warn"
std_instead_of_alloc = "warn"
alloc_instead_of_core = "warn"
[workspace.lints.rust]
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "warn"
unused_qualifications = "warn"

@BD103 BD103 added C-Benchmarks Stress tests and benchmarks used to measure how fast things are D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Dec 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 14, 2024
# Objective

- Closes #16804.
- This copies over our lint configuration to our benchmarks and fixes
any lints.

## Solution

- Copied over our Clippy configuration from the root `Cargo.toml` to
`benches/Cargo.toml`.
- Fixed any warnings that Clippy emitted.

## Testing

- `cd benches && cargo clippy --benches`
ecoskey pushed a commit to ecoskey/bevy that referenced this issue Jan 6, 2025
# Objective

- Closes bevyengine#16804.
- This copies over our lint configuration to our benchmarks and fixes
any lints.

## Solution

- Copied over our Clippy configuration from the root `Cargo.toml` to
`benches/Cargo.toml`.
- Fixed any warnings that Clippy emitted.

## Testing

- `cd benches && cargo clippy --benches`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Benchmarks Stress tests and benchmarks used to measure how fast things are D-Straightforward Simple bug fixes and API improvements, docs, test and examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant