mirror of https://github.com/PCSX2/pcsx2.git
ci: format the GameDB and make sure it stays that way
This commit is contained in:
parent
b54facdbd8
commit
9ba42ec950
|
@ -14,6 +14,7 @@ on:
|
|||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint and Validate GameDB
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
|
@ -30,4 +31,4 @@ jobs:
|
|||
- name: Check Formatting
|
||||
run: |
|
||||
npm install -g prettier
|
||||
prettier --check ./bin/Resources/GameIndex.yaml
|
||||
prettier --check ./bin/resources/GameIndex.yaml
|
||||
|
|
|
@ -213,7 +213,7 @@ option_validation_handlers = {
|
|||
class UniqueKeyLoader(yaml.FullLoader):
|
||||
def construct_mapping(self, node, deep=False):
|
||||
mapping = set()
|
||||
for key_node, value_node in node.value:
|
||||
for key_node, _ in node.value:
|
||||
key = self.construct_object(key_node, deep=deep)
|
||||
if key in mapping:
|
||||
raise ValueError(f"Duplicate {key!r} key found in YAML.")
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
overrides:
|
||||
- files: "**/GameIndex.yaml"
|
||||
options:
|
||||
tabWidth: 2
|
||||
useTabs: false
|
||||
quoteProps: consistent
|
||||
endOfLine: auto
|
||||
proseWrap: preserve
|
Loading…
Reference in New Issue