mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
ci: consistently enforce Lua coding style (#1029)
Co-authored-by: 三咲雅 · Misaki Masa <sxyazi@gmail.com>
This commit is contained in:
parent
28dfe728ab
commit
f0108dba40
3 changed files with 18 additions and 0 deletions
10
.github/workflows/check.yml
vendored
10
.github/workflows/check.yml
vendored
|
|
@ -39,3 +39,13 @@ jobs:
|
||||||
|
|
||||||
- name: Rustfmt
|
- name: Rustfmt
|
||||||
run: cargo +nightly fmt --all -- --check
|
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
2
.styluaignore
Normal 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
6
stylua.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
indent_width = 2
|
||||||
|
call_parentheses = "NoSingleTable"
|
||||||
|
collapse_simple_statement = "FunctionOnly"
|
||||||
|
|
||||||
|
[sort_requires]
|
||||||
|
enabled = true
|
||||||
Loading…
Add table
Reference in a new issue