Skip to content

Commit 6da59cb

Browse files
committed
Merge branch 'add shellcheck lint' into dev-2.x
2 parents caab849 + 8d29102 commit 6da59cb

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Quickstart for GitHub Actions
2+
# https://docs.github.com/en/actions/quickstart
3+
4+
name: Lint
5+
on: [ push, pull_request, workflow_dispatch ]
6+
7+
jobs:
8+
9+
test:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
name: Lint
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
- run: test-cases/lint.sh

bin/xpf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ portableReadLink() {
5353
THIS_SCRIPT="$(portableReadLink "${BASH_SOURCE[0]}")"
5454
BASE_DIR="$(dirname "$THIS_SCRIPT")"
5555

56+
# shellcheck disable=SC1091
5657
source "$BASE_DIR/xpl" "$@"

test-cases/lint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -eEuo pipefail
3+
4+
# cd to the root of the project
5+
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/..
6+
7+
find bin lib legacy-bin -type f |
8+
grep -Pv '/show-duplicate-java-classes$' |
9+
grep -Pv '/\.editorconfig$' |
10+
xargs --verbose shellcheck --shell=bash

0 commit comments

Comments
 (0)