From 0eb939a2b1a2886f9d52f3bd764614f43330e96a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 25 Jul 2022 17:22:41 -0400 Subject: Run deadnix as a linter --- Biz/Lint.hs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Biz/Lint.hs') diff --git a/Biz/Lint.hs b/Biz/Lint.hs index 8dafcb3..80e2665 100644 --- a/Biz/Lint.hs +++ b/Biz/Lint.hs @@ -131,6 +131,16 @@ pylint = fixArgs = Nothing } +deadnix :: Linter +deadnix = + Linter + { exe = "deadnix", + checkArgs = "--fail" : commonArgs, + fixArgs = Just <| "--edit" : commonArgs + } + where + commonArgs = ["--no-underscore", "--no-lambda-pattern-names"] + shellcheck :: Linter shellcheck = Linter {exe = "shellcheck", checkArgs = [], fixArgs = Nothing} @@ -159,9 +169,9 @@ runOne mode root cwd path_ = results +> traverse_ printResult >> results [ lint mode ormolu path_, lint mode hlint path_ ] - Just (Namespace _ Py) -> [] -- [lint mode pylint path_] + Just (Namespace _ Py) -> [pure <| NoOp path_] Just (Namespace _ Sh) -> [lint mode shellcheck path_] - Just (Namespace _ Nix) -> [pure <| NoOp path_] + Just (Namespace _ Nix) -> [lint mode deadnix path_] Just (Namespace _ Scm) -> [pure <| NoOp path_] Just _ -> [pure <. Warn <| "no linter for " <> Text.pack path_] -- cgit v1.2.3