Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hlint rules to prevent regression of #3628 #3710

Merged
merged 1 commit into from
Dec 27, 2017

Conversation

igrep
Copy link
Contributor

@igrep igrep commented Dec 26, 2017

Related: #3700

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Testing the change

I confirmed this change works with these tests:

  • command: hlint -- src/Network/HTTP/StackClient.hs
    result: doesn't reports error.
  • command: hlint src/Stack/New.hs without any modification
    result: doesn't reports error.
  • command: hlint src/Stack/New.hs after modifying like (1).
    result: exit with the message (2)

(1)

diff --git a/src/Stack/New.hs b/src/Stack/New.hs
index fcffc1cc..fa57755b 100644
--- a/src/Stack/New.hs
+++ b/src/Stack/New.hs
@@ -38,8 +38,8 @@ import qualified Data.Text.Lazy as LT
 import           Data.Time.Calendar
 import           Data.Time.Clock
 import qualified Data.Yaml as Yaml
-import           Network.HTTP.Download
-import           Network.HTTP.Simple (Request, HttpException, getResponseStatusCode, getResponseBody)
+import           Network.HTTP.Download hiding (httpJSON)
+import           Network.HTTP.Simple (Request, HttpException, httpJSON, getResponseStatusCode, getResponseBody)
 import           Path
 import           Path.IO
 import           Stack.Constants

(2)

src/Stack/New.hs:287:20: Error: Use alternative
Found:
  httpJSON
Why not:
  Network.HTTP.StackClient.httpJSON

1 hint

@mgsloan
Copy link
Contributor

mgsloan commented Dec 27, 2017

Looks great, thanks!!

@mgsloan mgsloan merged commit 12e3b7f into commercialhaskell:master Dec 27, 2017
@igrep igrep deleted the hlint-rules-3700 branch December 27, 2017 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants