summaryrefslogtreecommitdiff
path: root/Biz/Lint.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-08-16 14:18:10 -0400
committerBen Sima <ben@bsima.me>2023-08-16 18:25:00 -0400
commit7d7e0c02351303489d5555627337a39b519b536a (patch)
tree794817b6d6046a265a129c910885339058773198 /Biz/Lint.hs
parent30d03210f7ac5b12235760f625bac5ff3aa3f85a (diff)
Get python targets building
I added 'black' to Biz/Lint.hs, but not the others because they rely on dependencies being in the PYTHONPATH to work, so they are only relevant in nix builds and repls. I also made some other tweaks to the python checkPhase and linted all the files. Everything should be building and linting correctly now.
Diffstat (limited to 'Biz/Lint.hs')
-rw-r--r--Biz/Lint.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Biz/Lint.hs b/Biz/Lint.hs
index f9b16d0..be73229 100644
--- a/Biz/Lint.hs
+++ b/Biz/Lint.hs
@@ -123,6 +123,14 @@ hlint =
fixArgs = Nothing
}
+black :: Linter
+black =
+ Linter
+ { exe = "black",
+ checkArgs = ["--check"],
+ fixArgs = Just []
+ }
+
deadnix :: Linter
deadnix =
Linter
@@ -164,7 +172,9 @@ runOne mode root cwd path_ = results +> traverse_ printResult >> results
[ lint mode ormolu path_,
lint mode hlint path_
]
- Just (Namespace _ Py) -> [] -- python linters are run in Builder.nix checkPhase
+ Just (Namespace _ Py) ->
+ [ lint mode black path_
+ ]
Just (Namespace _ Sh) -> [lint mode shellcheck path_]
Just (Namespace _ Nix) -> [lint mode deadnix path_]
Just (Namespace _ Scm) -> [pure <| NoOp path_]