require-valid-instructions-apply-to-globs
Require path-specific Copilot instructions applyTo metadata to use repository-relative glob patterns.
Rule catalog ID: R044
Targeted pattern scopeâ
.github/instructions/**/*.instructions.md
What this rule reportsâ
applyToentries that start with./or../- absolute paths such as
/src/**orC:\repo\src\** - path-like values that use URI schemes or backslashes
- empty or otherwise non-portable
applyTopatterns
Why this rule existsâ
Path-specific instructions are meant to target files relative to the repository layout. Repository-relative globs are more portable across machines and clients than absolute paths, URI-like references, or current-directory-relative shortcuts.
â Incorrectâ
---
description: Frontend guidance
applyTo: ./src/**/*.ts
---
Use explicit return types.
â Correctâ
---
description: Frontend guidance
applyTo: src/**/*.ts
---
Use explicit return types.