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

Config file validation #2762

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EmilyGraceSeville7cf
Copy link

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

Provides completion and validation for some config files in a JSON format.

Features:

image

Testing

Testing has been performed in SchemaStore project.

Impact

Issue related to PR

  • Resolves #

Additional Information

VS Code code pulls schemas from a SchemaStore schema catalog in the background
according to .vscode/settings.json file and provides completion and
validation.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

- applications.json
- preset.json
@Real-MullaC
Copy link
Contributor

How does this work?

@EmilyGraceSeville7cf
Copy link
Author

EmilyGraceSeville7cf commented Sep 17, 2024

How does this work?

It checks whether config files match the structure of the JSON schemas. And if they do not, VS Code reports errors. Also, if a user presses Ctrl+Space possible key values are suggested. 😄

Here's an official site of a JSON schema.

@Real-MullaC
Copy link
Contributor

Make sure to update docs for if this is merged so people know.

@Marterich
Copy link
Contributor

Does this mean, winutil will become dependent on the third-party Github Repo SchemaStore for Autocompletion (e.g. If we want to add to the Schema[autocompletion], we are at the mercy of the Maintainer of SchemaStore to merge the Update PR) or am I missing something here?
I don't know how to feel about this...

@4yman-0
Copy link

4yman-0 commented Sep 18, 2024

winutil will become dependent on the third-party Github Repo SchemaStore for Autocompletion

Can we add files somewhere in the repo instead of hosting it on SchemaStore?

@EmilyGraceSeville7cf
Copy link
Author

EmilyGraceSeville7cf commented Sep 18, 2024

Does this mean, winutil will become dependent on the third-party Github Repo SchemaStore for Autocompletion (e.g. If we want to add to the Schema[autocompletion], we are at the mercy of the Maintainer of SchemaStore to merge the Update PR) or am I missing something here?
I don't know how to feel about this...

In the current implementation id does. But the way this completion is provided can be changed: I can put such schemas right here, in this repository. It's worth to note that I've just placed schemas to SchemaStore initially because I'm relatively well-known contributor there and my PRs are relatively quickly accepted. 😄 However, I share your feelings about SchemaStore. And I'll move schemas here.

Can we add files somewhere in the repo instead of hosting it on SchemaStore?

Yes, we can. It's technically possible. I just have to put schemas here and map them to validated JSON files (like I did with remote schemas).

@ruxunderscore
Copy link
Contributor

I like this idea. Can wait to see what other changes you bring. I'd like to see what you do with themes.json.

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

Successfully merging this pull request may close these issues.

5 participants