summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2022-03-01 16:26:23 +0000
committerHécate Moonlight <hecate+gitlab@glitchbra.in>2022-03-06 20:17:14 +0100
commitbbc2326f7d7288f861867e681d461b8a471de3e1 (patch)
treec4b9088e80fbcb1ab4e080383b4f387f3ffd3db0
parent706deee0524ca6af26c8b8d5cff17a6e401a2c18 (diff)
downloadhaskell-wip/T21146.tar.gz
gitlab-ci: Use the linters image in hlint jobwip/T21146
As the `hlint` executable is only available in the linters image. Fixes #21146.
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--compiler/GHC/Driver/Main.hs1
-rw-r--r--compiler/GHC/Driver/Make.hs1
-rw-r--r--compiler/GHC/Iface/Recomp.hs1
-rw-r--r--compiler/GHC/Rename/Module.hs3
-rw-r--r--compiler/GHC/Stg/InferTags/Rewrite.hs1
-rw-r--r--compiler/GHC/Tc/Errors.hs1
-rw-r--r--compiler/GHC/Tc/Errors/Types.hs1
-rw-r--r--compiler/GHC/Tc/Solver.hs1
-rw-r--r--compiler/GHC/Utils/Json.hs1
-rw-r--r--compiler/Setup.hs1
-rwxr-xr-xhadrian/lint4
-rw-r--r--hadrian/src/Rules/Lint.hs2
-rw-r--r--libraries/base/.hlint.yaml6
-rw-r--r--libraries/base/Data/Typeable/Internal.hs1
15 files changed, 7 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b30b38cedd..d9aaad921e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -281,6 +281,7 @@ lint-submods-branch:
hlint-ghc-and-base:
extends: .lint-params
+ image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
variables:
BUILD_FLAVOUR: default
script:
@@ -288,7 +289,6 @@ hlint-ghc-and-base:
- .gitlab/ci.sh configure
- .gitlab/ci.sh run_hadrian lint:base
- .gitlab/ci.sh run_hadrian lint:compiler
- allow_failure: true
############################################################
# Validation via Pipelines (hadrian)
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index da8ef86d1f..62187d573f 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1,7 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE NondecreasingIndentation #-}
-{-# LANGUAGE TupleSections #-}
{-# LANGUAGE GADTs #-}
{-# OPTIONS_GHC -fprof-auto-top #-}
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index bd4b4eeb57..05574f8ad8 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -1636,7 +1636,6 @@ enableCodeGenForTH
-> IO [ModuleGraphNode]
enableCodeGenForTH logger tmpfs unit_env =
enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env
- where
-- | Helper used to implement 'enableCodeGenForTH'.
-- In particular, this enables
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index 6d09892fdf..d6ee899794 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE DeriveFunctor #-}
-{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs
index 94864e8478..b46528c6ed 100644
--- a/compiler/GHC/Rename/Module.hs
+++ b/compiler/GHC/Rename/Module.hs
@@ -37,7 +37,7 @@ import GHC.Rename.Utils ( mapFvRn, bindLocalNames
import GHC.Rename.Unbound ( mkUnboundName, notInScopeErr, WhereLooking(WL_Global) )
import GHC.Rename.Names
import GHC.Tc.Errors.Types
-import GHC.Tc.Errors.Ppr (withHsDocContext)
+import GHC.Tc.Errors.Ppr (withHsDocContext, pprScopeError )
import GHC.Tc.Gen.Annotation ( annCtxt )
import GHC.Tc.Utils.Monad
@@ -68,7 +68,6 @@ import GHC.Data.Graph.Directed ( SCC, flattenSCC, flattenSCCs, Node(..)
import GHC.Types.Unique.Set
import GHC.Data.OrdList
import qualified GHC.LanguageExtensions as LangExt
-import GHC.Tc.Errors.Ppr (pprScopeError)
import Control.Monad
import Control.Arrow ( first )
diff --git a/compiler/GHC/Stg/InferTags/Rewrite.hs b/compiler/GHC/Stg/InferTags/Rewrite.hs
index 87b519006c..338d713a7a 100644
--- a/compiler/GHC/Stg/InferTags/Rewrite.hs
+++ b/compiler/GHC/Stg/InferTags/Rewrite.hs
@@ -10,7 +10,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs
index 1262dac062..2deec2bbd6 100644
--- a/compiler/GHC/Tc/Errors.hs
+++ b/compiler/GHC/Tc/Errors.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs
index ca835a4ae9..abf574df19 100644
--- a/compiler/GHC/Tc/Errors/Types.hs
+++ b/compiler/GHC/Tc/Errors/Types.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE GADTs #-}
-{-# LANGUAGE LambdaCase #-}
module GHC.Tc.Errors.Types (
-- * Main types
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs
index 7d0c10f924..1ea5ba7de1 100644
--- a/compiler/GHC/Tc/Solver.hs
+++ b/compiler/GHC/Tc/Solver.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE RecursiveDo #-}
-{-# LANGUAGE MultiWayIf #-}
module GHC.Tc.Solver(
InferMode(..), simplifyInfer, findInferredDiff,
diff --git a/compiler/GHC/Utils/Json.hs b/compiler/GHC/Utils/Json.hs
index 65880fe76e..3654ccd8b7 100644
--- a/compiler/GHC/Utils/Json.hs
+++ b/compiler/GHC/Utils/Json.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE GADTs #-}
-{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module GHC.Utils.Json where
diff --git a/compiler/Setup.hs b/compiler/Setup.hs
index e6d3d09d18..59746bf5a2 100644
--- a/compiler/Setup.hs
+++ b/compiler/Setup.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE LambdaCase #-}
module Main where
import Distribution.Simple
diff --git a/hadrian/lint b/hadrian/lint
index 8c43c89bd1..d0348532f9 100755
--- a/hadrian/lint
+++ b/hadrian/lint
@@ -1,5 +1,3 @@
#!/usr/bin/env bash
-"hadrian/build" "$@" test --test-root-dirs="testsuite/tests/linters"
- # hlint targets disabled as they do not currently run on CI.
- # lint:compiler lint:base
+"hadrian/build" "$@" test --test-root-dirs="testsuite/tests/linters" lint:compiler lint:base
diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs
index 6ca4e12674..dda608353c 100644
--- a/hadrian/src/Rules/Lint.hs
+++ b/hadrian/src/Rules/Lint.hs
@@ -12,7 +12,7 @@ lintRules = do
root <- buildRootRules
"lint:base" ~> lint base
"lint:compiler" ~> lint compiler
- root -/- "libraries" -/- "base" -/- "include" -/- "HsBaseConfig.h" %> \_ ->
+ "libraries" -/- "base" -/- "include" -/- "HsBaseConfig.h" %> \_ ->
-- ./configure is called here manually because we need to generate
-- HsBaseConfig.h, which is created from HsBaseConfig.h.in. ./configure
-- is usually run by Cabal which generates this file but if we do that
diff --git a/libraries/base/.hlint.yaml b/libraries/base/.hlint.yaml
index 55cd9f3fa1..b52817954e 100644
--- a/libraries/base/.hlint.yaml
+++ b/libraries/base/.hlint.yaml
@@ -23,7 +23,7 @@
# lints that we otherwise want applied elsewhere. Such exceptions are listed
# below.
-- ignore: {name: Unused LANGUAGE pragma, within: [GHC.IO.Encoding.CodePage, GHC.IO.Handle.Lock.Windows, GHC.Event.KQueue]}
+- ignore: {name: Unused LANGUAGE pragma, within: [GHC.IO.Encoding.CodePage, GHC.IO.Handle.Lock.Windows, GHC.Event.KQueue, GHC.Generics]}
- ignore: {name: Redundant do, within: [GHC.IO.Handle.Text.commitBuffer]}
-- ignore: {name: Use fewer imports, within: [GHC.Windows]}
-- ignore: {name: Use fewer imports, within: [GHC.Event.Control]}
+- ignore: {name: Use fewer imports, within: [GHC.Windows, GHC.Event.Control]}
+- ignore: {name: Use fewer LANGUAGE pragmas, within: [GHC.IO.Handle.Lock.LinuxOFD]}
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index e9cb1a1937..da786bd6d3 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -15,7 +15,6 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}