From df044f7b826ba368a49691c27237b4ade343ab5d Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 22 Mar 2025 12:36:58 +1100 Subject: [PATCH] chore: use luals for style check --- .github/workflows/ci.yml | 10 +++++----- CONTRIBUTING.md | 4 ++-- Makefile | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a059c1..85950014 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,17 +43,17 @@ jobs: strategy: matrix: - emmy_lua_code_style_version: [ 1.5.6 ] + luals_version: [ 3.13.9 ] steps: - uses: actions/checkout@v4 - - name: install emmy_lua_code_style + - name: install luals run: | - mkdir -p CodeFormat - curl -L "https://github.com/CppCXY/EmmyLuaCodeStyle/releases/download/${{ matrix.emmy_lua_code_style_version }}/linux-x64.tar.gz" | tar zx --directory CodeFormat + mkdir -p luals + curl -L "https://github.com/LuaLS/lua-language-server/releases/download/${{ matrix.luals_version }}/lua-language-server-${{ matrix.luals_version }}-linux-x64.tar.gz" | tar zx --directory luals - - run: echo "CodeFormat/linux-x64/bin" >> "$GITHUB_PATH" + - run: echo "luals/bin" >> "$GITHUB_PATH" - run: make style diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 742d4bc8..1d67bad5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Language server: [luals](https://luals.github.io) Lint: [luacheck](https://github.com/lunarmodules/luacheck/) -Style: [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle): `CodeCheck` +Style Fixing: [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle): `CodeCheck` nvim-tree.lua migrated from stylua to EmmyLuaCodeStyle ~2024/10. `vim.lsp.buf.format()` may be used as it is the default formatter for luals @@ -36,7 +36,7 @@ make lint ## style -1. Runs CodeCheck using `.editorconfig` settings +1. Runs lua language server `codestyle-check` only, using `.luarc.json` settings 1. Runs `scripts/doc-comments.sh` to validate annotated documentation ```sh diff --git a/Makefile b/Makefile index b5e829d8..72326964 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ luacheck: # --diagnosis-as-error does not function for workspace, hence we post-process the output style-check: - CodeFormat check --config .editorconfig --diagnosis-as-error --workspace lua + @scripts/luals-check.sh codestyle-check style-doc: scripts/doc-comments.sh