ci: consistently enforce Lua coding style (#1029)

Co-authored-by: 三咲雅 · Misaki Masa <sxyazi@gmail.com>
This commit is contained in:
Mika Vilpas 2024-05-15 05:54:20 +03:00 committed by GitHub
parent 28dfe728ab
commit f0108dba40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 0 deletions

View file

@ -39,3 +39,13 @@ jobs:
- name: Rustfmt
run: cargo +nightly fmt --all -- --check
stylua:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check .

2
.styluaignore Normal file
View file

@ -0,0 +1,2 @@
# this file caused some issues with the build system
yazi-plugin/preset/plugins/mime.lua

6
stylua.toml Normal file
View file

@ -0,0 +1,6 @@
indent_width = 2
call_parentheses = "NoSingleTable"
collapse_simple_statement = "FunctionOnly"
[sort_requires]
enabled = true