-
-
Notifications
You must be signed in to change notification settings - Fork 196
hlint: Improve existing code based on suggestions #355
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
Comments
When this is all said and done perhaps we should consider adding it to travis. On a quick look... it seems a bit strange that there is a parse error on |
We may also consider whether we want to make everything required if we put it in Travis. It looks like hlint has various levels (suggestion, warning, error) |
I saw that, but I didn't inspect it carefully.
Depending on how we can fine tine the suggestions, that would be great. Sometimes it gives suggestion I would like to ignore... ps: My plan was to finish the PRs today, but I'll have to leave it for tomorrow. |
We are not alone, I suppose. ndmitchell/hlint#216 |
|
Will telling hlint to ignore it be an acceptable solution? As we might see in http://community.haskell.org/~ndm/darcs/hlint/hlint.htm I added a |
Great finding! 👍
Even if we don't run |
With the ability to suppress specific HLint's suggestion, I believe we'll be able to run it in Travis. First we have to keep changing and supressing unwanted suggestions until we get no hints. Later, we'll have to find a way to install it in Travis. I didn't look at at, but I bet this will be the hardest part. |
Surprisingly (?), this appears not to be so hard: https://github.com/petertseng/xhaskell/commit/6682e7475f3c167c10bde2d70dbd1db656f19932 resulting in: |
Curiosity - this appears to have installed a different version than what I have locally. You see that I got it from the apt repos. The Travis workers run Precise, don't they... http://packages.ubuntu.com/source/precise/hlint seems to say that would be 1.8.24, whereas the version I have installed locally is 1.9.37. The suggestions given are different (on Travis, there is a So it may be better to have stack install a later version. Hopefully that is not that much harder...? |
A little. Another problem is that it may increase initial building times. |
Oh, you are right, this adds almost 8 minutes to the build time https://travis-ci.org/petertseng/xhaskell/jobs/162546960 https://github.com/petertseng/xhaskell/commit/9bf276f16c22111a39d9d6d4f8e55c1132a5c477 |
8 minutes?! I'll run some more tests later, but I'm still optimistic about it. :) |
I guess we are done with fixing all Thanks for everything, @petertseng!
|
To promote good coding practices, we are changing
README.md
to recommend contributors to runHLint
before every submission. #354That may help in the future, but running
hlint
onmaster
indicates that there is also a lot of work to be done right now. The following is a list of files to inspect and decide if we should accept HLint's suggestions:allergies/src/Example.hs
allergies: Improve code based on HLint's suggestions. #356all-your-base/src/Example.hs
all-your-base: Improve code based on HLint's sugestions. #357all-your-base/test/Tests.hs
all-your-base: Improve code based on HLint's sugestions. #357bank-account/test/Tests.hs
bank-account: Supress HLint suggestion #379binary-search-tree/test/Tests.hs
binary-search-tree: Improve code based on HLint's suggestions. #375bob/src/Example.hs
bob: Improve code based on HLint's suggestions. #358clock/test/Tests.hs
clock: Improve code based on HLint's suggestions. #359custom-set/src/Example.hs
custom-set: Improve code based on HLint's suggestions. #360custom-set/test/Tests.hs
custom-set: Improve code based on HLint's suggestions. #360forth/src/Example.hs
forth: Improved code based on HLint's suggestions. #361forth/test/Tests.hs
forth: Improved code based on HLint's suggestions. #361go-counting/src/Counting.hs
go-counting: Improve code based on HLint's suggestions. #362go-counting/src/Example.hs
go-counting: Improve code based on HLint's suggestions. #362hamming/src/Example.hs
hamming: Improve code based on HLint's suggestions. #363hexadecimal/src/Example.hs
hexadecimal: Supress HLint's suggestion to use isDigit. #376 (one hint ignored)linked-list/test/Tests.hs
linked-list: Supress HLint's suggestions to reduce duplication. #377 (three hints ignored)list-ops/src/Example.hs
list-ops: Improve code based on HLint's suggestions. #370, list-ops: Ignore HLint's hint to use foldr #373 (one hint ignored)matrix/test/Tests.hs
matrix: Improve code based on HLint's suggestions. #364minesweeper/src/Example.hs
minesweeper: Improve code based on HLint's suggestions. #365ocr-numbers/src/Example.hs
ocr-numbers: Improve code based on HLint's suggestions. #378pascals-triangle/test/Tests.hs
pascals-triangle: Improve code base on HLint's suggestions. #366pig-latin/src/Example.hs
pig-latin: Improve code based on HLint's suggestions. #367pig-latin/test/Tests.hs
pig-latin: Improve code based on HLint's suggestions. #367pov/src/Example.hs
pov: Improve code based on HLint's suggestions. #371pov/test/Tests.hs
pov: Improve code based on HLint's suggestions. #371raindrops/src/Example.hs
raindrops: Improved code based on HLint's suggestions. #369robot-name/src/Example.hs
robot-name: Fix HLint's suggestions and errors #380robot-name/test/Tests.hs
robot-name: Fix HLint's suggestions and errors #380simple-cipher/src/Example.hs
simple-cipher: Improve code based on HLint's suggestions. #372simple-linked-list/src/Example.hs
simple-linked-list: Improve code base on HLint's suggestions. #368The text was updated successfully, but these errors were encountered: