binbreak/rustfmt.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

66 lines
1.5 KiB
TOML

# Rustfmt configuration for binbreak project
# Edition
edition = "2024"
# Maximum width of each line
max_width = 100
# Maximum width of the args of a function call before falling back to vertical formatting
fn_call_width = 80
# Maximum width of the args of a function-like attributes before falling back to vertical formatting
attr_fn_like_width = 80
# Maximum width in the body of a struct lit before falling back to vertical formatting
struct_lit_width = 90
# Maximum width in the body of a struct variant before falling back to vertical formatting
struct_variant_width = 90
# Maximum width of an array literal before falling back to vertical formatting
array_width = 90
# Maximum width of a chain to fit on a single line
chain_width = 100
# Maximum line length for single line if-else expressions
single_line_if_else_max_width = 60
# How to indent in files
hard_tabs = false
# Number of spaces per tab
tab_spaces = 4
# Remove nested parens
remove_nested_parens = true
# Reorder imports
reorder_imports = true
# Reorder modules
reorder_modules = true
# Use field init shorthand if possible
use_field_init_shorthand = true
# Use try shorthand
use_try_shorthand = true
# Force explicit types in let statements
force_explicit_abi = true
# Newline style
newline_style = "Unix"
# Merge derives
merge_derives = true
# Use small heuristics (Off, Max, or Default)
# Max preserves more single-line expressions
use_small_heuristics = "Max"
# Match block trailing comma
match_block_trailing_comma = true