cjoudrey / graphql-schema-linter

Validate GraphQL schema definitions against a set of rules
MIT License
694 stars 62 forks source link

Add option to print config #208

Open MatthewRines opened 4 years ago

MatthewRines commented 4 years ago

New option to just print the configuration for feedback to the user. If the config is not valid, the runner does what it did before and exits with 2 after displaying the errors.

When the option is set,the linter prints the options, rules, and paths it would use and exits with a 0 status.

cjoudrey commented 4 years ago

Hey @MatthewRines! Thanks for the pull request! Really appreciate the help. 😄

Out of curiosity, what you made want to add this option? Were you trying to debug something about your config?

MatthewRines commented 4 years ago

Hey no problem!

I am working on an editor integration with emacs via flycheck so the options may be programmatically decided by the user's config. I wanted an option that could just verify the config and exit so if there is a problem somewhere we can eliminate graphql-schema-linter as the issue.

cjoudrey commented 4 years ago

Just realized I left this PR hanging so wanted to circle back to it. Was this still something you needed?