From c13e829e145daf96ea2be9b4d35fc2a94a1b33bd Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 22 Aug 2023 11:46:08 -0400 Subject: Replace pylint with ruff Ruff is like a million times faster, and I mostly ignored pylint's suggestions anyway. I also took this opportunity to move lint tools into a runtime dependency on Lint.hs, which meant adding a wrapper to the Haskell builder, which was easy enough. This paves the way for proper rundeps in bild. --- Biz/Lint.hs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Biz/Lint.hs') diff --git a/Biz/Lint.hs b/Biz/Lint.hs index cba6aef..2742fae 100644 --- a/Biz/Lint.hs +++ b/Biz/Lint.hs @@ -5,6 +5,17 @@ {-# LANGUAGE NoImplicitPrelude #-} -- : out lint +-- +-- these are actually runtime deps, but bild doesn't (yet) distinguish between +-- rundeps and sysdeps: +-- +-- : sys ormolu +-- : sys hlint +-- : sys black +-- : sys ruff +-- : sys deadnix +-- : sys shellcheck +-- : sys indent module Biz.Lint (main) where import Alpha @@ -130,6 +141,14 @@ black = fixArgs = Just [] } +ruff :: Linter +ruff = + Linter + { exe = "ruff", + checkArgs = ["check"], + fixArgs = Just ["check", "--fix"] + } + deadnix :: Linter deadnix = Linter @@ -172,7 +191,8 @@ runOne mode root cwd path_ = results +> traverse_ printResult >> results lint mode hlint path_ ] Just (Namespace _ Py) -> - [ lint mode black path_ + [ lint mode black path_, + lint mode ruff path_ ] Just (Namespace _ Sh) -> [lint mode shellcheck path_] Just (Namespace _ Nix) -> [lint mode deadnix path_] -- cgit v1.2.3