aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-29 01:48:14 +0200
committerGitHub <noreply@github.com>2023-04-29 01:48:14 +0200
commit057af3203b58771f07eb9c809573dd9275a597cb (patch)
treefdbc3ba9ff94f349141f7fa6d6b2f19b3028fee1
parent4720f4379ac79c6b8f88e3dce9f3c910b0f3aee2 (diff)
downloadrneovim-057af3203b58771f07eb9c809573dd9275a597cb.tar.gz
rneovim-057af3203b58771f07eb9c809573dd9275a597cb.tar.bz2
rneovim-057af3203b58771f07eb9c809573dd9275a597cb.zip
ci: replace stylua action with our own lint target
This will prevent situations where the linting works on CI but not locally, at the cost of increased CI time. Also manually ignore `runtime/vim/lua/re.lua`, as the .styluaignore isn't respected when specifying a file instead of a directory.
-rw-r--r--.github/workflows/test.yml15
-rw-r--r--CMakeLists.txt2
2 files changed, 11 insertions, 6 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2b0b9ff20a..0a44075f8e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -42,6 +42,13 @@ jobs:
- name: Install dependencies
run: ./.github/scripts/install_deps.sh lua-check
+ - name: Set up Homebrew
+ id: homebrew
+ uses: Homebrew/actions/setup-homebrew@master
+
+ - run: |
+ brew install stylua
+
- name: Cache uncrustify
id: cache-uncrustify
uses: actions/cache@v3
@@ -84,12 +91,8 @@ jobs:
run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: lintstylua
- uses: JohnnyMorganz/stylua-action@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- version: latest
- args: --check runtime/
+ name: stylua
+ run: cmake --build build --target lintlua-stylua
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: luacheck
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dad8f4b745..731bf09e2e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -236,6 +236,8 @@ add_glob_target(
FLAGS --color=always --check
GLOB_DIRS runtime/
GLOB_PAT *.lua
+ EXCLUDE
+ /runtime/lua/vim/re.lua
TOUCH_STRATEGY SINGLE)
add_custom_target(lintlua)