I added a root .editorconfig that matches how the existing files are already formatted. No existing file was reformatted.
Before writing it, I checked src/lib.rs, src/main.rs, tests/cli.rs, README.md and Cargo.toml. All of them use LF endings, contain no tabs, have no trailing whitespace, and end with a final newline.
- Global (
[*]): utf-8, LF, a final newline, and trailing whitespace trimmed. - Rust (
[*.rs]): 4-space indentation, which is the rustfmt default. - Markdown (
[*.md]): spaces for indentation, with trailing-whitespace trimming left on.README.mdhas no trailing double-space line breaks, so there was no reason to turn trimming off. - TOML (
[*.toml]): 4 spaces. This is a guess, becauseCargo.tomlhas no indented lines to confirm it.
cargo test runs but reports 0 tests passed, so it only confirms the crate builds. I didn't run the two test/grep checks on .editorconfig separately. I also didn't check the file against an actual editor or EditorConfig tool.