From c67339180776813df27436f7cafa9083677ed2c0 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Tue, 18 Apr 2023 19:40:10 +0200 Subject: [PATCH] build: Add stylua configuration for linting lua code Signed-off-by: Christoph Heiss --- .stylua.toml | 4 ++++ Makefile | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 .stylua.toml diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..5daf9f6 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,4 @@ +quote_style = "AutoPreferSingle" +indent_type = "Spaces" +indent_width = 2 +column_width = 80 diff --git a/Makefile b/Makefile index 2974b1c..c5adc3d 100644 --- a/Makefile +++ b/Makefile @@ -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: