diff options
author | Ben Sima <ben@bsima.me> | 2023-05-03 11:29:01 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-05-03 11:29:01 -0400 |
commit | c434004f4f69f3b4c5349add0703285d36b3ac5c (patch) | |
tree | a07a3849043e40d7c8f4a75fa6afbfe6ec96f72a /Biz/Lint.hs | |
parent | 232ec32f9b7a9aacc0a5c8741dacdaccf03c80fd (diff) |
Add C indent linter
Diffstat (limited to 'Biz/Lint.hs')
-rw-r--r-- | Biz/Lint.hs | 4 |
1 files changed, 4 insertions, 0 deletions
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 |