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

Lint/validate compilers.json #63

Closed
aidanheerdegen opened this issue Aug 22, 2023 · 0 comments · Fixed by #99
Closed

Lint/validate compilers.json #63

aidanheerdegen opened this issue Aug 22, 2023 · 0 comments · Fixed by #99
Assignees
Labels
priority:medium A medium priority issue - has some impact on functionality type:feature New feature or request

Comments

@aidanheerdegen
Copy link
Member

I should have picked this up when reviewing #42, sorry, but we should be doing at least a linting check on https://github.com/ACCESS-NRI/build-ci/blob/main/containers/compilers.json

If we're storing important information in containers.json we should add a CI linting check when it is updated. It is quite easy to make a syntax error, especially with quoted strings.

There are some GitHub marketplace actions, but nothing maintained/well-used/appropriate so probably sufficient to just use jq in this case, so see jqlang/jq#1637 (comment)

or jqlang/jq#1539 and check "array" is returned:

$ jq -c type compilers.json 
"array"

If we really wanted to check compilers.json file validity we would create a JSON schema and validate against it.

There is a marketplace action to do that, but it doesn't seem to be actively maintained

https://github.com/marketplace/actions/validate-json

There are lots of implementations, for CLI though it is either npm based or go based which might just introduce a whole lot of dependency hell.

A non-CLI python option is https://horejsek.github.io/python-fastjsonschema/

@aidanheerdegen aidanheerdegen added priority:medium A medium priority issue - has some impact on functionality type:feature New feature or request labels Aug 22, 2023
@CodeGat CodeGat self-assigned this Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium A medium priority issue - has some impact on functionality type:feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants