build: Add stylua configuration for linting lua code

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2023-04-18 19:40:10 +02:00
parent a0bcd443b7
commit c673391807
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7
2 changed files with 6 additions and 0 deletions

4
.stylua.toml Normal file
View file

@ -0,0 +1,4 @@
quote_style = "AutoPreferSingle"
indent_type = "Spaces"
indent_width = 2
column_width = 80

View file

@ -4,6 +4,7 @@ DEADNIX := nix run nixpkgs\#deadnix --
MORPH := nix run nixpkgs\#morph --
NIXFMT := nix run nixpkgs\#nixfmt --
STATIX := nix run nixpkgs\#statix --
STYLUA := nix run nixpkgs\#stylua --
.PHONY: format lint build-all upload-secrets-all build deploy deploy-full upload-secrets
@ -17,6 +18,7 @@ format:
lint:
$(DEADNIX) --fail
$(STATIX) check
$(STYLUA) --check .
find . -type f -name '*.nix' -exec $(NIXFMT) --check {} +
build-all: