Commit Graph

3 Commits

Author SHA1 Message Date
Srikanth Patchava
4cfd0b81b3
test: add pytest tests for template validator
Comprehensive test suite covering glob validation, trailing
whitespace detection, duplicate and conflict detection,
coverage analysis, and report formatting.

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
2026-05-16 09:30:28 -07:00
Srikanth Patchava
afdec22fa1
fix: add script to strip trailing whitespace from templates
Trailing whitespace in .gitignore patterns can cause unexpected
behavior. This script detects and removes trailing whitespace
from template files with dry-run support.

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
2026-05-16 09:30:28 -07:00
Srikanth Patchava
46742213f6
feat: add .gitignore template validator script
Add a comprehensive template validation tool that checks for:
- Valid glob pattern syntax
- Duplicate pattern detection
- Conflicting include/exclude rules
- Coverage analysis with suggestions
- CLI interface with argparse
- Detailed reporting (errors, warnings, suggestions)
- Support for processing all templates in the repo

Signed-off-by: Srikanth Patchava <spatchava@meta.com>
2026-05-16 09:30:28 -07:00