mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
ci: lint runtime with stylua
This commit is contained in:
parent
e31b32a293
commit
676e9e9334
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -86,6 +86,13 @@ jobs:
|
||||
name: clint-full
|
||||
run: ./ci/run_lint.sh clint-full
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: stylua
|
||||
uses: JohnnyMorganz/stylua-action@1.0.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --check runtime/
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: lualint
|
||||
run: ./ci/run_lint.sh lualint
|
||||
|
6
.stylua.toml
Normal file
6
.stylua.toml
Normal file
@ -0,0 +1,6 @@
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "Always"
|
3
.styluaignore
Normal file
3
.styluaignore
Normal file
@ -0,0 +1,3 @@
|
||||
/scripts
|
||||
/src
|
||||
/test
|
11
Makefile
11
Makefile
@ -146,9 +146,16 @@ functionaltest: | nvim
|
||||
functionaltest-lua: | nvim
|
||||
+$(BUILD_TOOL) -C build functionaltest-lua
|
||||
|
||||
stylua:
|
||||
stylua --check runtime/
|
||||
|
||||
lualint: | build/.ran-cmake deps
|
||||
$(BUILD_TOOL) -C build lualint
|
||||
|
||||
_opt_stylua:
|
||||
@command -v stylua && { $(MAKE) stylua; exit $$?; } \
|
||||
|| echo "SKIP: stylua (stylua not found)"
|
||||
|
||||
shlint:
|
||||
@shellcheck --version | head -n 2
|
||||
shellcheck scripts/vim-patch.sh
|
||||
@ -214,7 +221,7 @@ appimage:
|
||||
appimage-%:
|
||||
bash scripts/genappimage.sh $*
|
||||
|
||||
lint: check-single-includes clint lualint _opt_pylint _opt_shlint _opt_commitlint
|
||||
lint: check-single-includes clint _opt_stylua lualint _opt_pylint _opt_shlint _opt_commitlint
|
||||
|
||||
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
|
||||
# Does not work with "Unix Makefiles".
|
||||
@ -226,4 +233,4 @@ $(DEPS_BUILD_DIR)/%: phony_force
|
||||
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
|
||||
endif
|
||||
|
||||
.PHONY: test lualint pylint shlint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix commitlint
|
||||
.PHONY: test stylua lualint pylint shlint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix commitlint
|
||||
|
Loading…
Reference in New Issue
Block a user