diff options
| author | John Bampton <[email protected]> | 2021-04-11 12:51:28 +1000 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-04-16 16:37:52 +0900 |
| commit | 9d32d440ebf1ebd0684f5349316a15602bea5421 (patch) | |
| tree | ae119a76ef9922d77fd9d13efc095e0a746253ec /.github/workflows | |
| parent | ac9038121bec0141b93c8751248ffdb7688b9474 (diff) | |
| download | mruby-9d32d440ebf1ebd0684f5349316a15602bea5421.tar.gz mruby-9d32d440ebf1ebd0684f5349316a15602bea5421.zip | |
feat(CI): add the GitHub Super Linter
The GitHub Super Linter is a more robust and better supported
tool than the current GitHub Actions we are using.
Running these checks:
ERROR_ON_MISSING_EXEC_BIT: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_EDITORCONFIG: true
VALIDATE_MARKDOWN: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_YAML: true
https://github.com/marketplace/actions/super-linter
https://github.com/github/super-linter
Added the GitHub Super Linter badge to the README.
Also updated the pre-commit framework and added
more documentation on pre-commit.
Added one more pre-commit check: check-executables-have-shebangs
Added one extra check for merge conflicts to our
GitHub Actions.
EditorConfig and Markdown linting.
Minor grammar and spelling fixes.
Update linter.yml
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/lint.yml | 48 | ||||
| -rw-r--r-- | .github/workflows/linter.yml | 25 |
2 files changed, 39 insertions, 34 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fb7f62d4a..f949c5bbc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,52 +1,32 @@ -name: โ๏ธ Lint +name: Lint on: [pull_request] jobs: - markdownlint: - name: ๐ธ Markdown - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: ๐ Use Node.js - uses: actions/[email protected] - with: - node-version: '14' - - run: npm install -g [email protected] - - run: markdownlint '**/*.md' misspell: - name: ๐ฅ Check Spelling + name: Check Spelling runs-on: ubuntu-latest steps: - - name: ๐ Check Out + - name: Check Out uses: actions/checkout@v2 - - name: ๐
Install + - name: Install run: | wget -O - -q https://git.io/misspell | sh -s -- -b . - - name: ๐ถ๏ธ Misspell + - name: Misspell run: | git ls-files --empty-directory | xargs ./misspell -error - trailing-whitespace: - name: ๐ง Trailing whitespace + merge-conflict: + name: Merge Conflict runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: ๐งน Check for trailing whitespace - run: "! git grep -EIn $'[ \t]+$'" - yamllint: - name: ๐ถ YAML + - name: Check merge conflict + run: | + grep "^<<<<<<< HEAD" $(git ls-files | xargs) && exit 1 || true + trailing-whitespace: + name: Trailing whitespace runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax - architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install yamllint - - name: ๐งน YAML Lint - run: | - # return non-zero exit code on warnings - yamllint --strict . + - name: Check for trailing whitespace + run: "! git grep -EIn $'[ \t]+$'" diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..306060c3f --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,25 @@ +name: Lint Code Base + +on: + push: + branches-ignore: [master] + # Remove the line above to run when pushing to master + pull_request: + branches: [master] + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: github/super-linter@v3 + env: + ERROR_ON_MISSING_EXEC_BIT: true + VALIDATE_BASH: true + # VALIDATE_BASH_EXEC: true + # VALIDATE_EDITORCONFIG: true + VALIDATE_MARKDOWN: true + # VALIDATE_SHELL_SHFMT: true + VALIDATE_YAML: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
