Skip to content

Commit

Permalink
build(CI): add lint.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Sep 6, 2023
1 parent caab849 commit 0001765
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Quickstart for GitHub Actions
# https://docs.github.com/en/actions/quickstart

name: Lint
on: [ push, pull_request, workflow_dispatch ]

jobs:

test:
runs-on: ubuntu-latest
timeout-minutes: 5
name: Lint

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- run: test-cases/lint.sh
10 changes: 10 additions & 0 deletions test-cases/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -eEuo pipefail

# cd to the root of the project
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/..

find bin lib legacy-bin -type f |
grep -Pv '/show-duplicate-java-classes$' |
grep -Pv '/\.editorconfig$' |
xargs --verbose shellcheck --shell=bash

0 comments on commit 0001765

Please sign in to comment.