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

Allow YAML format for .netkans #75

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

HebaruSan
Copy link
Member

Motivation

See KSP-CKAN/CKAN#3367, we might want to allow .netkans to use YAML format. If so, our pull request validation Action will need to be able to handle that.

Changes

Now if a file is a .netkan, we use yamllint instead of jsonlint to validate its syntax.

Parsing of these files for our own use is taken care of in KSP-CKAN/NetKAN-Infra#219.

This should allow a pull request to be submitted to the NetKAN repo using YAML format with correct validation.

@DasSkelett
Copy link
Member

One issue I see by choosing the linting tool based on file extension is that internal ckans might create problems. According to KSP-CKAN/CKAN#3367 they are allowed to be YAML, but here we'd require them to be JSON, right?

@HebaruSan
Copy link
Member Author

One issue I see by choosing the linting tool based on file extension is that internal ckans might create problems. According to KSP-CKAN/CKAN#3367 they are allowed to be YAML, but here we'd require them to be JSON, right?

I don't think this can validate an internal .ckan file. It would have to be running in a mod's own repo, meaning it would use source=netkans mode, so only files with a .netkan extension would be checked. Files with a .ckan extension can only be validated in source=commits mode, where we want it to not allow YAML because CKAN-meta shouldn't have YAML.

@DasSkelett
Copy link
Member

Yeah I guess as long as they always stick to source=netkans they're fine, and there aren't many internal ckans anyway.

@HebaruSan HebaruSan merged commit 21d7a46 into KSP-CKAN:master Jun 10, 2021
@HebaruSan HebaruSan deleted the feature/yaml-netkan branch June 10, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants