Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting for --ignore-unknown-format. #24

Open
patrickDouglas opened this issue Jul 25, 2020 · 4 comments
Open

Setting for --ignore-unknown-format. #24

patrickDouglas opened this issue Jul 25, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@patrickDouglas
Copy link

Describe the solution you'd like
It would be nice to be able to have a boolean Setting that would allow for --ignore-unknown-format.

Additional context
Once unrecognized-format is "tweakable" in a ruleset via stoplightio/spectral#1124, this Setting should be able to be removed in favor of just using the ruleset approach.

Another suggest idea would be to have the option to pull in our configured Spectral object instead, which would allow the user to configure Spectral as they need, without the need to add new Settings. This would also resolve: #23.

@nulltoken
Copy link
Contributor

It would be nice to be able to have a boolean Setting that would allow for --ignore-unknown-format.

@patrickDouglas It's highly possible setting this setting to false would actually lead Spectral to keep on yelling at the user for every yaml/json file that do not fit the expected format.

Running Spectral usually puts the user in a "I'm gonna lint those" mood and accept the warnings.

However, while working in VSCode against completely unrelated files (think package.json or .travis.yml for instance), with the extension loaded, and lots of warnings may put him/her in a very different, less accepting mood with regards to Spectral.

Thoughts?

@nulltoken nulltoken added the enhancement New feature or request label Jul 25, 2020
@patrickDouglas
Copy link
Author

Haha, didn't even think of that and yeah, you wouldn't want that. I guess you'd have to enable it in conjunction with the validatingFiles setting in each WorkSpace in order to get around that. I think it would still be best to handle at the ruleset level, as that would allow you to control it all via the spectral.{yaml,json} file in each workspace, but in the interim, I think using it with validatingFiles would work. Thoughts?

@philsturgeon
Copy link
Contributor

philsturgeon commented Jul 25, 2020 via email

@nulltoken
Copy link
Contributor

nulltoken commented Jul 25, 2020

I think it would still be best to handle at the ruleset level, as that would allow you to control it all via the spectral.{yaml,json} file in each workspace

@patrickDouglas I strongly agree with that, but we would need stoplightio/spectral#1124 to land. And its priority isn't quite high at this moment. Would you feel like giving a hand contributing it? I'd be happy to support you during that process.

Meanwhile I'll work on stoplightio/spectral#1021 and stoplightio/spectral#1283 to improve the overall UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants