Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# HLint configuration file
# https://github.com/ndmitchell/hlint

# Not considered useful hints
- ignore: {name: "Redundant do"}
- ignore: {name: "Use section"}
- ignore: {name: "Use camelCase"}
- ignore: {name: "Use list comprehension"}
- ignore: {name: "Redundant if"}
- ignore: {name: "Avoid lambda"}
- ignore: {name: "Eta reduce"}
- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat
- ignore: {name: "Parse error"} # we trust the compiler over HLint
- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions
- ignore: {name: "Evaluate"}
- ignore: {name: "Use &&&"}
- ignore: {name: "Redundant compare"}

- ignore: {name: "Use fewer imports", within: [
"System.Process.Read", # Related to 'Hide post-AMP warnings' comment
"Stack.Exec" # ifdef for System.Process.Read
]
}

- ignore: {name: "Use fromMaybe", within: [
"Stack.Types.Config.explicitSetupDeps" # Related to 'explicit pattern matching is clearer' comment
]
}

# For clarity (related to do syntax)
- ignore: {name: "Reduce duplication", within: [
"Network.HTTP.Download.VerifiedSpec",
"Stack.PackageDumpSpec",
"Stack.Types.StackT",
"Stack.Docker"
]
}
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ script:
set -ex
case "$BUILD" in
style)
hlint src/ --hint=HLint.hs
hlint src/ --cpp-define=WINDOWS=1 --hint=HLint.hs
hlint test/ --cpp-simple --hint=HLint.hs
hlint src/
hlint src/ --cpp-define=WINDOWS=1
hlint test/ --cpp-simple
stack --system-ghc --no-terminal build --pedantic
;;
stack)
Expand Down
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ quality tool.
Note that stack contributors need not dogmatically follow the suggested hints
but are encouraged to debate their usefulness. If you find a hint is not useful
and detracts from readability, consider marking it in the [configuration
file](https://github.com/commercialhaskell/stack/blob/master/HLint.hs) to
be ignored. Please refer to the [HLint manual](https://github.com/ndmitchell/hlint#ignoring-hints)
file](https://github.com/commercialhaskell/stack/blob/master/.hlint.yaml) to
be ignored. Please refer to the [HLint manual](https://github.com/ndmitchell/hlint#readme)
for configuration syntax.

Quoting [@mgsloan](https://github.com/commercialhaskell/stack/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Amgsloan):
Expand All @@ -85,8 +85,7 @@ stack install hlint
Once installed, you can check your changes with:

```
hlint src/ test/ --cpp-simple --hint=HLint.hs
hlint src/ test/ --cpp-simple
```

Where `--cpp-simple` strips `#` lines and `--hint` explicitly specifies the
configuration file.
Where `--cpp-simple` strips `#` lines.
37 changes: 0 additions & 37 deletions HLint.hs

This file was deleted.

2 changes: 0 additions & 2 deletions src/Stack/Types/Resolver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}
Expand Down
1 change: 0 additions & 1 deletion src/test/Stack/GhciSpec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- {-# LANGUAGE QuasiQuotes #-}
-- {-# LANGUAGE TemplateHaskell #-}

Expand Down
6 changes: 1 addition & 5 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-8.22
resolver: lts-9.0
# docker:
# enable: true
# repo: fpco/stack-full
Expand All @@ -19,8 +19,4 @@ flags:
extra-deps:
- Cabal-2.0.0.2
- mintty-0.1.1
- text-metrics-0.3.0
- unicode-transforms-0.3.2
- unliftio-core-0.1.0.0
- unliftio-0.1.0.0
- bindings-uname-0.1