chore: use luals for style check
This commit is contained in:
parent
e02ba60bb4
commit
df044f7b82
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
2
Makefile
2
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user