Closed chshersh closed 1 year ago
The recommended command line to use is:
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
Which just forwards to the one you list. I imagine taking an @version-number
or similar would work? Patches very welcome!
@ndmitchell Thanks, that's much shorter! I see that the hlint
repository has tags and official releases. Does it mean that something like this already can work?
curl -sSL https://raw.github.com/ndmitchell/hlint/v2.2.11/misc/run.sh | sh -s .
No, that script always grabs the latest, but might no longer work as things change. If it could be made to work with low effort that would be great, but my guess is the information is just not there.
Feel free to check out the PR 🙌
@KristianBalaj Thanks for getting back to this really old issue!
I'm actually fine with closing it, as I no longer use neil
to install HLint.
Moreover, I'm no longer using Travis CI.
Instead, I download the HLint binary directly from GitHub release in my GitHub Actions like this:
- name: Run HLint
env:
HLINT_VERSION: "3.5"
run: |
curl -L https://github.com/ndmitchell/hlint/releases/download/v${HLINT_VERSION}/hlint-${HLINT_VERSION}-x86_64-linux.tar.gz --output hlint.tar.gz
tar -xvf hlint.tar.gz
./hlint-${HLINT_VERSION}/hlint src/ test/
So I'm happy to close this issue 👌🏻
Thanks for writing and maintaining the script to run
hlint
painlessly on Travis CI! We've been enjoying using it a lot in @kowainik. It's quite easy to run the code viahlint
on CI using the following command:If my understanding is correct, this script always uses the latest available version of HLint. I wonder though, is it possible to somehow specify the desired HLint version to run?
The reason for this question is when you return to your project after a month, or if some volunteer contributor opens a PR against your repo, you'll see HLint failures on CI in a code that wasn't even touched in the PR. This can be sometimes annoying to see and fix periodically, especially when I also need to build new
hlint
version locally to see the errors. It would be really convenient to change HLint version manually and explicitly, when you want. This will also help with better reproducibility 🙂