binbreak/clippy.toml
William Raendchen de05e0c91c
cleanup: remove obsolete code, configure rustfmt and clippy (#7)
* chore: remove unnecessary needs_render checks from game logic

* chore: remove needs_render flag and related logic from game state

* chore: add rustfmt configuration file for consistent formatting

* chore: clean up imports and formatting in app.rs, binary_numbers.rs, main_screen_widget.rs, rustfmt.toml, and utils.rs

* chore: remove outdated comment from binary_numbers.rs

* chore: remove outdated comments from binary_numbers.rs

* chore: extract game over rendering logic into a separate function

* run clippy fix

* chore: add Clippy configuration files for linting thresholds

* run clippy fix

* chore: allow clippy warnings in selected places. check fix later

* docs: add command docs for linting and formatting

* docs: add command docs for linting and formatting

* split BinaryNumbersPuzzle.render_ref into several sub functions for rendering different areas.

* chore: adjust clippy lint levels to allow certain patterns

* chore: add CI configuration with testing, clippy, and formatting jobs

* cargo fmt

* chore: simplify clippy and formatting commands in CI configuration

* chore: consolidate cargo caching in CI configuration

* chore: replace cargo caching with rust-cache action in CI configuration

* chore: use is_multiple_of for streak check in score calculation

* chore: simplify game over check in render logic
2025-11-22 15:24:40 +01:00

32 lines
1.3 KiB
TOML

# ============================================================================
# Clippy Threshold Configuration
# ============================================================================
# This file configures clippy threshold values that cannot be set in Cargo.toml
# Lint levels (warn/deny/allow) are configured in Cargo.toml [lints.clippy]
# https://doc.rust-lang.org/clippy/lint_configuration.html
# ============================================================================
# Complexity thresholds
cognitive-complexity-threshold = 30 # default: 25
too-many-arguments-threshold = 8 # default: 7
too-many-lines-threshold = 80 # default: 100
type-complexity-threshold = 250 # default: 500
# Boolean usage limits
max-struct-bools = 4 # default: 3
max-fn-params-bools = 3 # default: 3
# Variable naming
single-char-binding-names-threshold = 4 # default: 4
allowed-idents-below-min-chars = [
"x", "y", "dx", "dy", "dt", # coordinates and delta time
"id", "ui", "io", # common abbreviations
"hs", # high scores (project-specific)
]
# Other thresholds
vec-box-size-threshold = 4096 # default: 4096
max-trait-bounds = 3 # default: 3