s_all should enforce a small set of basic source-formatting checks so that obvious issues are caught locally and in CI instead of during review. The current ticket lists the desired checks, but it needs more background and clearer scope.
Proposed scope:
- Reject non-ASCII characters in code source files.
- Reject trailing whitespace.
- Reject indentation that uses tabs instead of spaces.
Background:
These checks are intended to make the codebase more predictable across tools and environments, and to prevent avoidable formatting and character-encoding issues from slipping in unnoticed. In particular, non-ASCII characters in source can be problematic from both tooling and readability/security perspectives, while trailing whitespace and tab indentation are simple formatting issues that should be caught automatically.
Expected outcome:
- s_all fails when a source file contains non-ASCII characters.
- s_all fails when a source file contains trailing whitespace.
- s_all fails when indentation uses tabs.
- The failure output identifies the offending file and, where practical, the offending line.
- The checks are documented so developers understand what is being enforced.
Notes / open questions:
- Define which file types are considered "code sources" for this check.
- If there are valid exceptions, document them explicitly rather than relying on ad hoc behavior.
- If similar checks already exist elsewhere, s_all should either reuse them or become the single place where they are enforced.