Skip to content

Commit ddc369d

Browse files
docs: update README for untracked and working-tree files (#2459)
## Description Updates `scripts/linting/README.md` to accurately reflect the working-tree validation and untracked-file discovery changes introduced in commit `deb66e4` (PR #2437). **Changes made:** - **Markdown-Link-Check.ps1:** Added a feature bullet noting the discovery of tracked and untracked, non-ignored Markdown files so local validation does not require staging. - **Get-ChangedFilesFromGit:** - Updated the main description to clarify that working-tree (staged/unstaged) and untracked files are always supplemented, regardless of branch context. - Expanded the "Fallbacks" list to accurately document all 4 distinct git queries (including the new `git ls-files --others --exclude-standard` step). ## Related Issue(s) Fixes #2448 ## Type of Change Select all that apply: **Code & Documentation:** * [ ] Bug fix (non-breaking change fixing an issue) * [ ] New feature (non-breaking change adding functionality) * [ ] Breaking change (fix or feature causing existing functionality to change) * [x] Documentation update **Infrastructure & Configuration:** * [ ] GitHub Actions workflow * [ ] Linting configuration (markdown, PowerShell, etc.) * [ ] Security configuration * [ ] DevContainer configuration * [ ] Dependency update **Other:** * [ ] Script/automation (`.ps1`, `.sh`, `.py`) * [ ] Other (please describe): ## Checklist ### Required Checks * [x] Documentation is updated (if applicable) * [x] Files follow existing naming conventions * [x] Changes are backwards compatible (if applicable) * [ ] Tests added for new functionality (if applicable) ### Required Automated Checks The following validation commands must pass before merging: * [x] Markdown linting: `npm run lint:md` * [x] Spell checking: `npm run spell-check` * [x] Frontmatter validation: `npm run lint:frontmatter` * [ ] Skill structure validation: `npm run validate:skills` *(N/A - no skill files changed)* * [ ] Link validation: `npm run lint:md-links` *(N/A - no URLs added/modified)* * [ ] PowerShell analysis: `npm run lint:ps` *(N/A - no .ps1/.psm1 files changed)* * [ ] Eval spec schema and coverage (if AI artifacts changed): `npm run eval:lint:schema` *(N/A)* * [ ] Plugin freshness: `npm run plugin:generate` *(N/A)* * [ ] Docusaurus tests: `npm run docs:test` *(N/A)* ## Security Considerations * [x] This PR does not contain any sensitive or NDA information * [ ] Any new dependencies have been reviewed for security issues *(N/A - no new dependencies)* * [ ] Security-related scripts follow the principle of least privilege *(N/A)* Co-authored-by: Jamie Kim <jamiekim500@gmail.com>
1 parent 8befd01 commit ddc369d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/linting/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ Purpose: Detect broken links before deployment.
234234

235235
##### Features
236236

237+
* Discovers tracked and untracked, non-ignored Markdown files so local validation does not require staging
237238
* Checks internal and external links
238239
* Configurable via `markdown-link-check.config.json`
239240
* Retries failed links
@@ -569,7 +570,7 @@ Common helper functions for file discovery and git operations.
569570

570571
#### `Get-ChangedFilesFromGit`
571572

572-
Detects files changed in current branch compared to main.
573+
Detects files changed in the current branch compared to a base branch, and always supplements this list with working-tree (staged/unstaged) and untracked files, regardless of the branch context.
573574

574575
##### Parameters
575576

@@ -582,7 +583,8 @@ Returns: Array of changed file paths
582583

583584
1. `git merge-base` with specified base branch
584585
2. `git diff HEAD~1` when merge-base fails
585-
3. `git diff HEAD` for staged/unstaged files
586+
3. `git diff --name-only HEAD` for working tree staged/unstaged files
587+
4. `git ls-files --others --exclude-standard` for untracked, non-ignored files
586588

587589
#### `Get-FilesRecursive`
588590

0 commit comments

Comments
 (0)