From a21998a75bc9c08d5e047b63a99a9da1b93b1e3c Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Mon, 12 May 2025 09:33:55 -0500 Subject: [PATCH 1/5] [AOMP] Adds shellcheck workflow This adds an initial (crude) shellcheck workflow. This can be refined much more. - Use shellcheck directly from maintainer github. - Filter which files to check. - Come up with set of guidelines / rules for errs/warns. --- .github/workflows/aomp-shell.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/aomp-shell.yml diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml new file mode 100644 index 000000000..a40544e1f --- /dev/null +++ b/.github/workflows/aomp-shell.yml @@ -0,0 +1,21 @@ +name: AOMP Lint + +on: + push: + pull_request: + +jobs: + aomp-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up shellcheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + + - name: Run shellcheck + run: | + find . -name "*.sh" -exec shellcheck {} \; From 84a52b920024f1e79e7d4e1ac1c0cbf3503876ca Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Mon, 12 May 2025 09:40:30 -0500 Subject: [PATCH 2/5] [AOMP] Set warning severity as to consider --- .github/workflows/aomp-shell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml index a40544e1f..f7a68b908 100644 --- a/.github/workflows/aomp-shell.yml +++ b/.github/workflows/aomp-shell.yml @@ -18,4 +18,4 @@ jobs: - name: Run shellcheck run: | - find . -name "*.sh" -exec shellcheck {} \; + find . -name "*.sh" -exec shellcheck -S warning {} \; From dd17749f4d28cd8cfa02bf96457df43428c38479 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Mon, 12 May 2025 09:42:20 -0500 Subject: [PATCH 3/5] [AOMP] Change to info --- .github/workflows/aomp-shell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml index f7a68b908..e02baaa62 100644 --- a/.github/workflows/aomp-shell.yml +++ b/.github/workflows/aomp-shell.yml @@ -18,4 +18,4 @@ jobs: - name: Run shellcheck run: | - find . -name "*.sh" -exec shellcheck -S warning {} \; + find . -name "*.sh" -exec shellcheck -S info {} \; From 05b773169c316af23af3efcb4b1ff2afc2890d9d Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Mon, 12 May 2025 09:49:07 -0500 Subject: [PATCH 4/5] [AOMP] Make the job fail with error Use find + xargs to make the job fail in case shellcheck found issues. --- .github/workflows/aomp-shell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml index e02baaa62..4b946b5fa 100644 --- a/.github/workflows/aomp-shell.yml +++ b/.github/workflows/aomp-shell.yml @@ -18,4 +18,4 @@ jobs: - name: Run shellcheck run: | - find . -name "*.sh" -exec shellcheck -S info {} \; + find . -name "*.sh" | xargs shellcheck -S info {} \; From 53295548a1785b5a57e5254b2880ee11b0a12673 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Tue, 20 May 2025 08:56:18 -0500 Subject: [PATCH 5/5] [AOMP] Remove apt update/shellcheck install --- .github/workflows/aomp-shell.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml index 4b946b5fa..d18291860 100644 --- a/.github/workflows/aomp-shell.yml +++ b/.github/workflows/aomp-shell.yml @@ -11,11 +11,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up shellcheck - run: | - sudo apt-get update - sudo apt-get install -y shellcheck - - name: Run shellcheck run: | find . -name "*.sh" | xargs shellcheck -S info {} \;