瀏覽代碼

[Bugfix] ignore jdtls to fix `CI` (#1339)

Abouzar Parvan 3 年之前
父節點
當前提交
1cc2452eb7
共有 3 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      .github/workflows/format.yaml
  2. 1 0
      .github/workflows/lint.yaml
  3. 3 3
      .pre-commit-config.yaml

+ 1 - 1
.github/workflows/format.yaml

@@ -40,5 +40,5 @@ jobs:
       # https://google.github.io/styleguide/shellguide.html
       - name: Check formatting
         run: |
-          shfmt -i 2 -ci -l -d .
+          shfmt -f . | grep -v jdtls | xargs shfmt -i 2 -ci -l -d
     

+ 1 - 0
.github/workflows/lint.yaml

@@ -32,3 +32,4 @@ jobs:
       uses: ludeeus/action-shellcheck@master
       with:
        scandir: './utils'
+       ignore: 'bin'

+ 3 - 3
.pre-commit-config.yaml

@@ -5,16 +5,16 @@ repos:
         name: shfmt
         minimum_pre_commit_version: 2.4.0
         language: system
-        entry: shfmt
-        args: [-i=2, -ci, -w]
         types: [shell]
+        entry: bash
+        args: [-c, "shfmt -f $(git rev-parse --show-toplevel) | grep -v jdtls | xargs shfmt -i=2 -ci -w"]
       - id: shellcheck
         name: shellcheck
         language: system
         types: [shell]
         entry: bash
         args:
-          [-c, "shfmt -f $(git rev-parse --show-toplevel) | xargs shellcheck"]
+          [-c, "shfmt -f $(git rev-parse --show-toplevel) | grep -v jdtls | xargs shellcheck"]
       - id: stylua
         name: StyLua
         language: rust