zeroclaw/.editorconfig
Alex Gorevski b1c04d8f88 feat(tooling): add .editorconfig, rustfmt.toml, and clippy.toml
Add explicit linting and formatting configuration files to document
intent and provide consistent defaults across editors and platforms.

- .editorconfig: UTF-8, LF line endings, 4-space indent for Rust,
  2-space for YAML/TOML, preserve trailing whitespace in Markdown.
- rustfmt.toml: Pin edition to 2021 matching Cargo.toml. Uses
  standard defaults; file documents that this is intentional.
- clippy.toml: Set cognitive-complexity-threshold to 30,
  too-many-arguments-threshold to 10, and too-many-lines-threshold
  to 200. Thresholds tuned to match existing codebase patterns and
  reduce noise from existing allow-attributes.

All values match current implicit defaults or are tuned to avoid
triggering on existing code. No source code changes required.

Validated: cargo fmt --check and cargo clippy -D clippy::correctness
both pass with no regressions.

Resolves #662

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 10:02:09 +08:00

25 lines
457 B
INI

# EditorConfig — https://editorconfig.org
# Provides consistent formatting defaults across editors and platforms.
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.md]
# Trailing whitespace is significant in Markdown (line breaks).
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[*.toml]
indent_size = 2
[Dockerfile]
indent_size = 4