You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using spectral for linting a couple of long specs that we have written at work. A while back, we defined some common schemas for both specs, so we extracted those into a schemas.yml file and referenced it in the specs with $ref: schemas.yml/#FooBar. Unfortunately, when we did this, I failed to realize that spectral would no longer report unused components for those. I'm assuming the reasoning is that external components might be actually used, so when you're linting one spec, you might be reporting as unused some components that belong to the other one. This is reasonable, but now I am removing a large chunk of one of the specs as we got rid of a set of deprecated operations, and I am very much not looking forward to manually going through all the components referenced in the operations being removed.
I'm looking for the ability to tell spectral that the set of specs I'm passing it should cover the entirety of the components. Currently we have separate jobs for linting the specs:
I've been using spectral for linting a couple of long specs that we have written at work. A while back, we defined some common schemas for both specs, so we extracted those into a schemas.yml file and referenced it in the specs with
$ref: schemas.yml/#FooBar
. Unfortunately, when we did this, I failed to realize that spectral would no longer report unused components for those. I'm assuming the reasoning is that external components might be actually used, so when you're linting one spec, you might be reporting as unused some components that belong to the other one. This is reasonable, but now I am removing a large chunk of one of the specs as we got rid of a set of deprecated operations, and I am very much not looking forward to manually going through all the components referenced in the operations being removed.I'm looking for the ability to tell spectral that the set of specs I'm passing it should cover the entirety of the components. Currently we have separate jobs for linting the specs:
I don't mind e.g. merging both of these jobs if that's what it takes to report components unused across all of my specs:
The text was updated successfully, but these errors were encountered: