1
0
Fork 0
mirror of https://github.com/imjasonh/testscript-rs synced 2026-07-12 02:49:35 +00:00

Add rustfmt.toml and update CLAUDE.md with formatting commands

Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-30 06:45:13 +00:00
parent 5e36f27de9
commit 9f297d064b
2 changed files with 39 additions and 0 deletions

View file

@ -20,6 +20,12 @@ cargo test parser::tests::
# Run single test
cargo test test_basic_api
# Format code (always run before committing)
cargo fmt
# Check code formatting
cargo fmt --check
# Check code quality
cargo clippy --all-targets -- -D warnings
cargo check

33
rustfmt.toml Normal file
View file

@ -0,0 +1,33 @@
# rustfmt configuration for testscript-rs
# This ensures consistent code formatting across the project
# Only includes stable rustfmt features for compatibility
# Use the 2021 edition for better formatting
edition = "2021"
# Line width - commonly used value that works well for most screens
max_width = 100
# Hard tabs - set to false for spaces
hard_tabs = false
# Tab spaces
tab_spaces = 4
# Newline style
newline_style = "Unix"
# Use field init shorthand when possible
use_field_init_shorthand = true
# Use try shorthand
use_try_shorthand = true
# Reorder imports
reorder_imports = true
# Remove nested parens
remove_nested_parens = true
# Merge derives
merge_derives = true