- Notifications
You must be signed in to change notification settings - Fork253
Create jsonschema for configuration file#747
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sorry for the late review@zidhuss. Adding a reference for the.swift-format file is great!
I assume you wrote the schema by hand, right? I think it would be great if we had a script to make sure it’s in sync with Configuration.md. Maybe we could even generate Configuraiton.md based on the JSON schema. Could you be interested in writing such as script (ideally in Swift but really any scripting language would be fine)?
It would be great to generate this from the doc comments in the |
This PR adds a JSON Schema that describes the
.swift-formatconfiguration file.When this schema is referenced, It serves as a form of documentation and provides auto-completion and validation for configuration options (in editors that support it).
Ideally you'd want to generate this from the code as done in#615. However the documentation for the other configuration options isn't automated from the comments leading to out of date documentation (#455).
My aim is to get this schema in theschema store so that editors automatically associate
.swift-formatfiles with it.