From 64c5858f7bc01fa9c0e0bc5726066ce6167bea81 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 19 Feb 2021 10:06:56 -0500 Subject: Add support for hlint --refactor --- Biz/Bild/Rules.nix | 1 + Biz/Bild/Sources.json | 26 ++++++++++++++++++++++++++ Biz/Lint.hs | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) (limited to 'Biz') diff --git a/Biz/Bild/Rules.nix b/Biz/Bild/Rules.nix index 4875455..fb36100 100644 --- a/Biz/Bild/Rules.nix +++ b/Biz/Bild/Rules.nix @@ -136,6 +136,7 @@ in rec { [ p.black p.pylint ])) # tools + nixpkgs.haskell.packages.${ghcCompiler}.apply-refact nixpkgs.cmark nixpkgs.figlet nixpkgs.haskell.packages.${ghcCompiler}.fast-tags diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json index 2aea2c8..934f658 100644 --- a/Biz/Bild/Sources.json +++ b/Biz/Bild/Sources.json @@ -1,4 +1,17 @@ { + "apply-refact": { + "branch": "master", + "description": "Refactor Haskell source files", + "homepage": "", + "owner": "mpickering", + "repo": "apply-refact", + "rev": "0.8.2.1", + "sha256": "0wyamn4w3lsayhsqs6h60f0m337b1p5byw1frmcyima3pqsgprvl", + "type": "tarball", + "url": "https://github.com/mpickering/apply-refact/archive/0.8.2.1.tar.gz", + "url_template": "https://github.com///archive/.tar.gz", + "version": "0.8.2.1" + }, "clay": { "branch": "master", "description": "A CSS preprocessor as embedded Haskell.", @@ -12,6 +25,19 @@ "url_template": "https://github.com///archive/.tar.gz", "version": "cc7729b1b42a79e261091ff7835f7fc2a7ae3cee" }, + "ghc-exactprint": { + "branch": "master", + "description": "GHC version of haskell-src-exts exactPrint", + "homepage": null, + "owner": "alanz", + "repo": "ghc-exactprint", + "rev": "3e70715a756c46761a3a6a086a6be5dee4e60d22", + "sha256": "1mhmk1555n7qr25iwbm8kbjs24c9j0q01j4m2kmz6zh7r1gjayxs", + "type": "tarball", + "url": "https://github.com/alanz/ghc-exactprint/archive/3e70715a756c46761a3a6a086a6be5dee4e60d22.tar.gz", + "url_template": "https://github.com///archive/.tar.gz", + "version": "0.6.3.4" + }, "ghcjs-base": { "branch": "master", "description": "base library for GHCJS for JavaScript interaction and marshalling, used by higher level libraries like JSC", diff --git a/Biz/Lint.hs b/Biz/Lint.hs index 17edb37..3039b72 100644 --- a/Biz/Lint.hs +++ b/Biz/Lint.hs @@ -117,7 +117,7 @@ hlint = Linter { exe = "hlint", args = [], - fixArgs = Nothing + fixArgs = Just ["--refactor", "--refactor-options=-i"] } pylint :: Linter -- cgit v1.2.3