Commit 2648215
authored
fix(scripts): accepts the token (YYYY-MM-dd) in frontmatter validation (#133)
# Pull Request
## Description
Updated the validation logic in
`scripts/linting/Validate-MarkdownFrontmatter.ps1` to support the
`(YYYY-MM-dd)` placeholder token in the `ms.date` field.
## Related Issue(s)
Closes #130
## Type of Change
Select all that apply:
**Code & Documentation:**
- [ ] Bug fix (non-breaking change fixing an issue)
- [x] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to
change)
- [ ] Documentation update
**Infrastructure & Configuration:**
- [ ] GitHub Actions workflow
- [x] Linting configuration (markdown, PowerShell, etc.)
- [ ] Security configuration
- [ ] DevContainer configuration
- [ ] Dependency update
**AI Artifacts:**
- [ ] Reviewed contribution with `prompt-builder` chatmode and addressed
all feedback
- [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [ ] Copilot chatmode (`.github/chatmodes/*.chatmode.md`)
**Other:**
- [x] Script/automation (`.ps1`, `.sh`, `.py`)
- [ ] Other (please describe):
## Testing
I performed the following manual tests to verify the changes:
1. **Reproduction**: Created a temporary file `docs/test-fail.md` with
`ms.date: (YYYY-MM-dd)` and confirmed it failed validation before the
fix.
```
./scripts/linting/Validate-MarkdownFrontmatter.ps1
🔍 Validating frontmatter across markdown files...
Searching for markdown files in specified paths...
Found 30 total markdown files to validate
::warning file=/workspaces/hve-core/README.md::Invalid date format:
Expected YYYY-MM-DD (ISO 8601), got: (2025-11-05)
::warning
file=/workspaces/hve-core/docs/templates/templates/tmp/test-fail.md::Invalid
date format: Expected YYYY-MM-DD (ISO 8601), got: (2025-06-06)
1 parent 4538a03 commit 2648215
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
| 750 | + | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
868 | | - | |
| 868 | + | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| |||
0 commit comments