浏览代码

ci(spelling): automatically accept aliased commands (#10475)

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Josh Soref 3 年之前
父节点
当前提交
44d8edea05
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 3 0
      .github/actions/spelling/expect.txt
  2. 8 0
      .github/workflows/spelling.yml

+ 3 - 0
.github/actions/spelling/expect.txt

@@ -22,6 +22,7 @@ acr
 acroread
 acs
 acsc
+acss
 acsp
 actionformats
 Adamantium
@@ -1459,6 +1460,7 @@ gpr
 gpristine
 gpsup
 gpu
+gpus
 gpv
 gradle
 gradlew
@@ -2396,6 +2398,7 @@ mirrorlist
 mixin
 mkcd
 mkdir
+mkdirs
 mktag
 mktemp
 mktree

+ 8 - 0
.github/workflows/spelling.yml

@@ -30,6 +30,14 @@ jobs:
     - name: checkout
       if: github.event_name == 'push'
       uses: actions/checkout@v2
+    - name: find aliases
+      run: |
+        for a in $(git ls-files|grep '\.zsh$'); do
+          echo "-- $a"
+          if [ -s "$a" ]; then
+            perl -ne 'next unless s/^alias ([A-Za-z]{3,})=.*/$1/;print' "$a" | tee -a .github/actions/spelling/allow.txt
+          fi
+        done;
     - name: check-spelling
       id: spelling
       uses: check-spelling/check-spelling@prerelease