mirror of
https://github.com/neovim/neovim.git
synced 2025-11-06 02:34:28 +00:00
ci: replace stylua action with our own lint target (#23838)
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.
This commit is contained in:
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
@@ -42,6 +42,13 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./.github/scripts/install_deps.sh lua-check
|
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
|
- name: Cache uncrustify
|
||||||
id: cache-uncrustify
|
id: cache-uncrustify
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@@ -84,12 +91,8 @@ jobs:
|
|||||||
run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
|
run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||||
name: lintstylua
|
name: stylua
|
||||||
uses: JohnnyMorganz/stylua-action@v2
|
run: cmake --build build --target lintlua-stylua
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
version: latest
|
|
||||||
args: --check runtime/
|
|
||||||
|
|
||||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||||
name: luacheck
|
name: luacheck
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ add_glob_target(
|
|||||||
FLAGS --color=always --check
|
FLAGS --color=always --check
|
||||||
GLOB_DIRS runtime/
|
GLOB_DIRS runtime/
|
||||||
GLOB_PAT *.lua
|
GLOB_PAT *.lua
|
||||||
|
EXCLUDE
|
||||||
|
/runtime/lua/vim/re.lua
|
||||||
TOUCH_STRATEGY SINGLE)
|
TOUCH_STRATEGY SINGLE)
|
||||||
|
|
||||||
add_custom_target(lintlua)
|
add_custom_target(lintlua)
|
||||||
|
|||||||
Reference in New Issue
Block a user