Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Use HLint3.hlint in Lint #829

Merged
merged 1 commit into from
Aug 29, 2016
Merged

Use HLint3.hlint in Lint #829

merged 1 commit into from
Aug 29, 2016

Conversation

lierdakil
Copy link
Collaborator

Related: #826

So, this seems to work fine, although passing --quiet seems a bit more brittle than it should be.

@DanielG, up to you if we want to use this or wait until hlint upstream fixes (I will report an issue soon)

@DanielG
Copy link
Owner

DanielG commented Aug 29, 2016

Looks good. Are there any downsides to using this?

@lierdakil
Copy link
Collaborator Author

Well, the main downside is basically substFile. While with other approach we can just pass the filename and file contents, here we have to replace filename in post. Also we lose control of input file encoding, but hlint uses utf-8 by default since 1.9.12 I believe (ndmitchell/hlint#96)

@lierdakil
Copy link
Collaborator Author

Also worth noting that if '--quiet' is omitted (or syntax ever changes for some ungodly reason), hlint will spew its output to stdout, in addition to returning [Idea]. Tests should catch if it goes awry. In any case, hlint function comes with the following warning:

Warning: The flags provided by HLint are relatively stable, but do not have the same
API stability guarantees as the rest of the strongly-typed API. Do not run this function
on a your server with untrusted input.

@DanielG
Copy link
Owner

DanielG commented Aug 29, 2016

sounds reasonable

@DanielG DanielG merged commit 57a31c3 into master Aug 29, 2016
@lierdakil lierdakil deleted the hlint-api-switch branch August 29, 2016 16:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants