Skip to content

feat(validator): per-file rule exclusions via fileExcludes#137

Draft
mrwogu wants to merge 1 commit intomainfrom
feat/per-file-rule-excludes
Draft

feat(validator): per-file rule exclusions via fileExcludes#137
mrwogu wants to merge 1 commit intomainfrom
feat/per-file-rule-excludes

Conversation

@mrwogu
Copy link
Copy Markdown
Owner

@mrwogu mrwogu commented Mar 19, 2026

Summary

  • New fileExcludes config option allows disabling specific validation rules for files matching glob patterns
  • Uses picomatch for glob matching
  • Wired through promptscript.yaml -> compiler -> validator pipeline

Example

validation:
  fileExcludes:
    - pattern: "skills/**/SKILL.md"
      rules: [PS011]
    - pattern: "vendor/**"
      rules: [empty-block, PS012]

Changes

  • ValidatorConfig.fileExcludes (validator types)
  • PromptScriptConfig.validation.fileExcludes (core config types)
  • Validator.validate() computes per-file excluded rules before the rule loop
  • JSON schema updated (schema/config.json)
  • Docs: config.md reference + security.md guidance on false positives
  • 5 new tests covering match/no-match/multiple entries/empty config

Test plan

  • 394 validator tests pass (5 new)
  • Full pipeline: format, lint, typecheck, test, validate, schema:check, skill:check, docs:formatters:check
  • CI green

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Bundle Report

Changes will increase total bundle size by 52.37kB (5.06%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
promptscript-cli 1.09MB 52.37kB (5.06%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: promptscript-cli

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.js 52.37kB 981.81kB 5.63% ⚠️

New `fileExcludes` option in `ValidatorConfig` and `promptscript.yaml`
allows disabling specific rules for files matching glob patterns.
Uses picomatch for glob matching.

Example:
  validation:
    fileExcludes:
      - pattern: "skills/**/SKILL.md"
        rules: [PS011]
@mrwogu mrwogu force-pushed the feat/per-file-rule-excludes branch from 6ac2783 to 3c663bc Compare March 19, 2026 23:17
@mrwogu
Copy link
Copy Markdown
Owner Author

mrwogu commented Mar 25, 2026

Not needed so far

@mrwogu mrwogu marked this pull request as draft March 26, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant