@@ -15,7 +15,9 @@ markdown-toc --maxdepth=2 -i CONTRIBUTING.md
1515- [ Quality] ( #quality )
1616 * [ lint] ( #lint )
1717 * [ style] ( #style )
18+ * [ format-fix] ( #format-fix )
1819 * [ check] ( #check )
20+ * [ format-check] ( #format-check )
1921- [ Diagnostics] ( #diagnostics )
2022- [ Backwards Compatibility] ( #backwards-compatibility )
2123- [ : help Documentation] ( #help-documentation )
@@ -36,10 +38,10 @@ Language server: [luals](https://luals.github.io)
3638
3739Lint: [ luacheck] ( https://github.com/lunarmodules/luacheck/ )
3840
39- Style Fixing: [ EmmyLuaCodeStyle] ( https://github.com/CppCXY/EmmyLuaCodeStyle ) : ` CodeCheck `
40-
4141nvim-tree.lua migrated from stylua to EmmyLuaCodeStyle ~ 2024/10. ` vim.lsp.buf.format() ` may be used as it is the default formatter for luals, using an embedded [ EmmyLuaCodeStyle] ( https://github.com/CppCXY/EmmyLuaCodeStyle )
4242
43+ Formatting: [ EmmyLuaCodeStyle] ( https://github.com/CppCXY/EmmyLuaCodeStyle ) : ` CodeFormat ` executable
44+
4345You can install them via you OS package manager e.g. ` pacman ` , ` brew ` or other via other package managers such as ` cargo ` or ` luarocks `
4446
4547# Quality
@@ -67,10 +69,12 @@ make lint
6769make style
6870```
6971
70- You can automatically fix style issues using ` CodeCheck ` :
72+ ## format-fix
73+
74+ You can automatically fix most style issues using ` CodeFormat ` :
7175
7276``` sh
73- make style -fix
77+ make format -fix
7478```
7579
7680## check
@@ -96,6 +100,17 @@ curl -L "https://github.com/LuaLS/lua-language-server/releases/download/3.15.0/l
96100PATH=" luals/bin:${PATH} " make check
97101```
98102
103+ ## format-check
104+
105+ This is run in CI. Commit or stage your changes and run:
106+
107+ ``` sh
108+ make format-check
109+ ```
110+
111+ - Re-runs ` make format-fix `
112+ - Checks that ` git diff ` is empty, to ensure that all content has been generated. This is why a stage or commit is necessary.
113+
99114# Diagnostics
100115
101116Diagnostics issues may not be suppressed. See [ luals] ( https://luals.github.io ) documentation for details on how to structure the code and comments.
0 commit comments