Spectral override not working when ruleset is in subdirectory - rule still triggers despite being turned off #2856
Unanswered
sidneyamani
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm having an issue with Spectral where my override configuration doesn't seem to work when my ruleset file is located in a subdirectory. The rule I'm trying to disable still triggers even though I've specified it should be turned off for a specific file.
Here's my minimal reproducible example:
Project structure:
foo/rules.yml:
bar/api.yml:
The Problem
When I run Spectral from the project root:
I get:
The test-rule is still being applied even though I have an override that should turn it off for bar/api.yml.
What I tried
I tried to replace '**/api.yml' with 'bar/api.yml', Same result. However if I use
../**/api.ymlor '../bar/api.yml' it works.Questions
I'm using Spectral CLI version 6.15.0.
Any help would be appreciated! Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions