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

ci: catch duplicate YAML keys and formatting issues in the GameDB #6134

Merged
merged 2 commits into from
May 23, 2022

Conversation

xTVaser
Copy link
Member

@xTVaser xTVaser commented May 23, 2022

Description of Changes

The GameDB linter will now fail over duplicate keys (this is a violation as per the yaml spec) as well as formatting errors

Rationale behind Changes

PyYAML does not fail over this yaml/pyyaml#165 recently we merged some changes that got hit by this.

In practice this effectively eliminates one of the entries as the one encountered first wins.

Suggested Testing Steps

Check out the last 3 commits here, xTVaser#112 it failed when it should have and passed when everything was alright.

I'm using prettier to do the formatting, to do so locally you'll want to:

npm install -g prettier
prettier --write ./bin/resources/GameIndex.yaml
# alternatively just:
npx prettier --write ./bin/resources/GameIndex.yaml

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