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

Enforce JSON formatting for schemas using CI checks #2312

Open
aaronfranke opened this issue Aug 22, 2023 · 0 comments
Open

Enforce JSON formatting for schemas using CI checks #2312

aaronfranke opened this issue Aug 22, 2023 · 0 comments

Comments

@aaronfranke
Copy link
Contributor

aaronfranke commented Aug 22, 2023

I noticed that some of the schemas have minor inconsistencies between them. Some have "title":, and some have a space before the colon "title" :. Some files have "extensions": { },, some files have "extensions" : {},.

Sometimes arrays have spaces:

    "required": [ "sampler", "target" ]

Sometimes they do not:

    "required": ["packet"]

Sometimes files have a mix of tabs and spaces:

                    "output": "rotation",
		            "extensions" : {
		               "extension_name" : {
		                  "extension specific" : "value"
		               }
		            },
                    "extras" : {

While these inconsistencies could be fixed manually, I think it makes sense for Khronos to pick one JSON style and enforce it via a JSON formatter in CI checks so that it stays consistent. I would recommend applying this to vendor extensions too (it only changes the formatting of the JSON, not its contents, so I think it's fine).

Aside from JSON formatting, it would also be a good idea to enforce UTF-8 and enforce POSIX compliance by having end of line at end of file. Currently many files have this, and many files don't.

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

No branches or pull requests

1 participant