diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d99808e53..325ce30f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,19 @@ name: Build and Deploy on: [push, pull_request, pull_request_target] jobs: + yamllint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Yamllint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: games/*.yaml originals/*.yaml schema/*.yaml + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-and-deploy: runs-on: ubuntu-latest steps: diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 000000000..53a03113e --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,5 @@ +rules: + indentation: + spaces: 2 + indent-sequences: false + level: warning diff --git a/games/0.yaml b/games/0.yaml index bcb6e7c00..d05f1eec7 100644 --- a/games/0.yaml +++ b/games/0.yaml @@ -76,9 +76,9 @@ development: active status: playable multiplayer: - - Competitive - - Online - - Co-op + - Competitive + - Online + - Co-op content: commercial langs: - Java diff --git a/games/m.yaml b/games/m.yaml index a1eff0f94..ccc4f2680 100644 --- a/games/m.yaml +++ b/games/m.yaml @@ -496,9 +496,9 @@ info: A sandbox tower defense game updated: 2020-12-23 images: - - https://mindustrygame.github.io/images/1.png - - https://mindustrygame.github.io/images/2.png - - https://mindustrygame.github.io/images/3.png + - https://mindustrygame.github.io/images/1.png + - https://mindustrygame.github.io/images/2.png + - https://mindustrygame.github.io/images/3.png - name: MineClone 2 development: active diff --git a/originals/g.yaml b/originals/g.yaml index 5795e97fa..9badb26f5 100644 --- a/originals/g.yaml +++ b/originals/g.yaml @@ -258,11 +258,11 @@ external: wikipedia: Gunpoint (video game) meta: - genres: - - Platform - - Puzzle - themes: - - Sci-Fi + genres: + - Platform + - Puzzle + themes: + - Sci-Fi - name: Gwent external: @@ -270,9 +270,9 @@ platforms: - Windows meta: - genres: - - Turn-Based Strategy - subgenres: - - Board Game - themes: - - Fantasy + genres: + - Turn-Based Strategy + subgenres: + - Board Game + themes: + - Fantasy diff --git a/package.json b/package.json index 375c10f13..51bca57d1 100644 --- a/package.json +++ b/package.json @@ -5,4 +5,4 @@ "linguist-languages": "^7.15.0" }, "dependencies": {} -} +} \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 8e890f762..7cd5d3586 100644 --- a/poetry.lock +++ b/poetry.lock @@ -67,6 +67,14 @@ python-versions = ">=3.6" fast = ["fastnumbers (>=2.0.0)"] icu = ["PyICU (>=1.0.0)"] +[[package]] +name = "pathspec" +version = "0.9.0" +description = "Utility library for gitignore style pattern matching of file paths." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + [[package]] name = "pykwalify" version = "1.8.0" @@ -173,10 +181,22 @@ category = "main" optional = false python-versions = ">=3.5" +[[package]] +name = "yamllint" +version = "1.27.1" +description = "A linter for YAML files." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pathspec = ">=0.5.3" +pyyaml = "*" + [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "1cc411e7d9f5235086c93c64f700669e3a43dffae35a62c5e02250447af10e9b" +content-hash = "85e6f99250c5d6086591dbf9227bc88143c22e161fb6bc21ad1e79339bb29aba" [metadata.files] click = [ @@ -272,6 +292,7 @@ natsort = [ {file = "natsort-8.0.0-py3-none-any.whl", hash = "sha256:5f5f4ea471d655b1b1611eef1cf0c6d3397095d2d3a1aab7098d6a50e4c3901a"}, {file = "natsort-8.0.0.tar.gz", hash = "sha256:a0a4fd71aee20a6d648da61e01180a63f7268e69983d0440bd3ad80ef1ba6981"}, ] +pathspec = [] pykwalify = [ {file = "pykwalify-1.8.0-py2.py3-none-any.whl", hash = "sha256:731dfa87338cca9f559d1fca2bdea37299116e3139b73f78ca90a543722d6651"}, {file = "pykwalify-1.8.0.tar.gz", hash = "sha256:796b2ad3ed4cb99b88308b533fb2f559c30fa6efb4fa9fda11347f483d245884"}, @@ -365,3 +386,4 @@ unidecode = [ {file = "Unidecode-1.3.2-py3-none-any.whl", hash = "sha256:215fe33c9d1c889fa823ccb66df91b02524eb8cc8c9c80f9c5b8129754d27829"}, {file = "Unidecode-1.3.2.tar.gz", hash = "sha256:669898c1528912bcf07f9819dc60df18d057f7528271e31f8ec28cc88ef27504"}, ] +yamllint = [] diff --git a/pyproject.toml b/pyproject.toml index 3c96fbc48..ff116c695 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ jinja2 = "3.0.3" python-slugify = "^5.0.2" [tool.poetry.dev-dependencies] +yamllint = "^1.27.1" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/schema/originals.yaml b/schema/originals.yaml index 5880acffb..b80f4b783 100644 --- a/schema/originals.yaml +++ b/schema/originals.yaml @@ -23,8 +23,8 @@ sequence: platforms: type: seq sequence: - - include: platforms - unique: True + - include: platforms + unique: True meta: include: meta