Skip to content

Commit d1e85f6

Browse files
committed
Minor tweaks to instructions and fixes
1 parent 7e27200 commit d1e85f6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/copilot-instructions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ Each AEP ruleset file (`aep/XXXX.yaml`) contains:
5050

5151
- **Aliases** - Reusable JSONPath patterns (e.g., `GetOperation`,
5252
`ListOperation`)
53+
- **Functions** - Custom functions specific to that AEP (if needed)
5354
- **Rules** - Individual validation rules with format
54-
`aep-{number}-{description}`
55+
`aep-{number}-{description}` listed alphabetically by rule name
5556

5657
### Test Organization
5758

@@ -70,6 +71,8 @@ Each test uses the `linterForRule` utility to test specific rules in isolation.
7071
- Rules MUST be prefixed with `aep-` and listed alphabetically in
7172
`spectral.yaml`
7273
- Custom function names MUST match the rule name minus the `aep-` prefix
74+
- Functions declared in a file's `functions:` list MUST be used by at least one
75+
rule in that same file (no unused function declarations)
7376
- Rule severity mapping:
7477
- `error` - for AEP or OpenAPI **MUST** guidelines
7578
- `warn` - for AEP or OpenAPI **SHOULD** guidelines
@@ -93,8 +96,7 @@ When adding a new rule, create/update these four locations:
9396
- Code coverage MUST be > 80% for all functions in `functions/*.js`
9497
- Use the `linterForRule()` utility from `test/utils.js` to test rules in
9598
isolation
96-
- Use custom matchers from `test/matchers.js` (e.g., `.toHaveNoViolations()`,
97-
`.toHaveViolation()`)
99+
- Use custom matchers from `test/matchers.js` (e.g., `.toContainMatch()`)
98100

99101
### Example File Sync
100102

spectral.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ extends:
1818
- ./aep/0193.yaml
1919
functionsDir: './functions'
2020
functions:
21-
- aep-142-time-field-type
2221
- parameter-names-unique
23-
- operations-endpoint
24-
- standardized-codes
2522
rules:
2623
openapi-tags: off
2724
operation-tags: off

0 commit comments

Comments
 (0)