summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Biz/Bild.nix2
-rw-r--r--Biz/Lint.hs4
2 files changed, 5 insertions, 1 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index 5774950..69fe5e1 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -137,7 +137,7 @@ rec {
} // { env = ghc; };
env = let
- linters = with nixpkgs.pkgs; [ ormolu hlint deadnix ];
+ linters = with nixpkgs.pkgs; [ ormolu hlint deadnix indent ];
in nixpkgs.pkgs.mkShell {
name = "bizdev";
# this should just be dev tools
diff --git a/Biz/Lint.hs b/Biz/Lint.hs
index 39c42db..d44e465 100644
--- a/Biz/Lint.hs
+++ b/Biz/Lint.hs
@@ -152,6 +152,9 @@ deadnix =
shellcheck :: Linter
shellcheck = Linter {exe = "shellcheck", checkArgs = [], fixArgs = Nothing}
+indent :: Linter
+indent = Linter {exe = "indent", checkArgs = [], fixArgs = Nothing}
+
data Status = Good | Bad String
deriving (Show)
@@ -181,6 +184,7 @@ runOne mode root cwd path_ = results +> traverse_ printResult >> results
Just (Namespace _ Sh) -> [lint mode shellcheck path_]
Just (Namespace _ Nix) -> [lint mode deadnix path_]
Just (Namespace _ Scm) -> [pure <| NoOp path_]
+ Just (Namespace _ C) -> [lint mode indent path_]
Just _ -> [pure <. Warn <| "no linter for " <> Text.pack path_]
lint :: Mode -> Linter -> FilePath -> IO Result