diff options
author | Ben Sima <ben@bsima.me> | 2022-07-25 17:22:41 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-07-25 17:47:27 -0400 |
commit | 0eb939a2b1a2886f9d52f3bd764614f43330e96a (patch) | |
tree | 177a6dcaa5d0ef89f05e0b9250463ec9f9044c94 /Biz/Lint.hs | |
parent | 953fc16e402c56798f26b7c3d1f38f23560b0faa (diff) |
Run deadnix as a linter
Diffstat (limited to 'Biz/Lint.hs')
-rw-r--r-- | Biz/Lint.hs | 14 |
1 files changed, 12 insertions, 2 deletions
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_] |