You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/24 01:47:34 UTC

[GitHub] [apisix] leslie-tsang commented on a change in pull request #6428: ci: add shellcheck linter

leslie-tsang commented on a change in pull request #6428:
URL: https://github.com/apache/apisix/pull/6428#discussion_r813479868



##########
File path: .github/workflows/code-lint.yml
##########
@@ -28,3 +28,20 @@ jobs:
         . ./ci/common.sh
         export_or_prefix
         make lint
+
+  sc-lint:
+    runs-on: ubuntu-latest
+    timeout-minutes: 5
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2.4.0
+        with:
+          submodules: true
+
+      - name: Shellcheck code
+        run: |
+          scversion="latest"
+          wget -O- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
+          cp -av "shellcheck-${scversion}/shellcheck" /usr/local/bin/

Review comment:
       can we use `apt` to install `spellcheck` ?
   like
   ```bash
   apt install -y shellcheck
   ```

##########
File path: .github/workflows/code-lint.yml
##########
@@ -28,3 +28,20 @@ jobs:
         . ./ci/common.sh
         export_or_prefix
         make lint
+
+  sc-lint:
+    runs-on: ubuntu-latest
+    timeout-minutes: 5
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2.4.0
+        with:
+          submodules: true
+
+      - name: Shellcheck code
+        run: |
+          scversion="latest"
+          wget -O- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv

Review comment:
       ```suggestion
             wget -O- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
   ```
   Why use `-J` here ?
   
   Can it replace with `-z` ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org