From 85dbcaa3d2218d84e3e3d3124c8d4089ab897d77 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 22 Jul 2022 13:14:43 +0200 Subject: [PATCH] add check which looks for non-json files in data/ --- .github/workflows/codespell.yml | 17 ----------------- .github/workflows/lint.yml | 29 ++++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index d2c248dc..00000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,17 +0,0 @@ -# GitHub Action to automate the identification of common misspellings in text files. -# https://github.com/codespell-project/actions-codespell -# https://github.com/codespell-project/codespell -name: codespell -on: [push, pull_request] -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - skip: ./.git,./dist/translations - ignore_words_list: "auxilary,casette,cemetary,chancel,extentions,faiway,generat,goverment,guerilla,kindergarden,pavillion,sculpter,storys" - only_warn: 1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b7b64038..0c5c59ba 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,20 @@ -name: prettier check +name: code style checks on: [push, pull_request] jobs: lint: + name: Check file endings + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + notJSONs=`find data/ -type f -not -iname "*.json"` + for f in $notJSONs + do + echo "::error file=$f::File $f is not a .json file." + done + if [ ! -z "$notJSONs" ]; then exit 1; fi + + prettier: name: Check for code formatting mistakes runs-on: ubuntu-latest steps: @@ -10,4 +23,18 @@ jobs: with: node-version: '18' - run: npm install + - run: 'for f in `find data/ -type f -not -iname "*.json"`; do echo "::error File $f is not a .json file."; done' - run: npm run lint + + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@master + with: + check_filenames: true + skip: ./.git,./dist/translations + ignore_words_list: "auxilary,casette,cemetary,chancel,extentions,faiway,generat,goverment,guerilla,kindergarden,pavillion,sculpter,storys" + only_warn: 1 +