From 403114ff322941353048596a15d2939e58cd6cb3 Mon Sep 17 00:00:00 2001 From: kmahapatra Date: Mon, 25 Sep 2023 17:08:47 +0000 Subject: [PATCH] Manual shellcheck (#321) --- .github/workflows/knative-style.yaml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml index 55bb1537..3598cb0a 100644 --- a/.github/workflows/knative-style.yaml +++ b/.github/workflows/knative-style.yaml @@ -1,15 +1,31 @@ # Copyright 2020 The Knative Authors. # SPDX-License-Identifier: Apache-2.0 -# This file is automagically synced here from github.com/knative-extensions/knobots +# This file is manually placed. Not using github.com/knative-extensions/knobots +# The reasons are outlined in https://github.com/knative/infra/issues/207 +# Explaination of options https://github.com/reviewdog/action-shellcheck -name: Code Style +name: shellcheck_reviewdog on: pull_request: branches: [ 'main', 'release-*' ] jobs: - - style: - uses: knative/actions/.github/workflows/reusable-style.yaml@main + shellcheck: + name: "manual / shellcheck" + description: "Uses reviewdog to suggest shell script format changes. Enforces ShellCheck." + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "ShellCheck" + uses: reviewdog/action-shellcheck@v1 + with: + reporter: 'github-pr-review' + pattern: "*.sh" + filter_mode: 'diff_context' + exclude: | + ./vendor/* + */vendor/* + shellcheck_flags: | + --external-sources -e=SC1091