summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHécate <hecate+gitlab@glitchbra.in>2020-09-22 20:35:49 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-24 13:17:44 -0400
commit007940d2fa1ac4f8046989d4af1d088914612a78 (patch)
tree5d5d90d58f43b0a881e74e2c6a498f8b082602f7
parent6d0ce0eb772bf69c57e14f30c16c606ab5035816 (diff)
downloadhaskell-007940d2fa1ac4f8046989d4af1d088914612a78.tar.gz
Namespace the Hadrian linting rule for base
-rw-r--r--hadrian/src/Rules/Lint.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs
index bbecc08c31..39e047a4d4 100644
--- a/hadrian/src/Rules/Lint.hs
+++ b/hadrian/src/Rules/Lint.hs
@@ -7,21 +7,21 @@ import Settings.Builders.Common
import System.Directory (findExecutable)
lintRules :: Rules ()
-lintRules = "lint" ~> lint
+lintRules = "lint:base" ~> lint base
-lint :: Action ()
-lint = do
+lint :: Action () -> Action ()
+lint lintAction = do
isHlintPresent <- isJust <$> (liftIO $ findExecutable "hlint")
if isHlintPresent
then do
putBuild "| Running the linter…"
- lintBase
+ lintAction
putSuccess "| Done."
else
putFailure "| Please make sure you have the `hlint` executable in your $PATH"
-lintBase :: Action ()
-lintBase = do
+base :: Action ()
+base = do
topDir <- topDirectory
buildDir <- buildRoot
let stage1Lib = topDir </> buildDir </> "stage1/lib"