-
Notifications
You must be signed in to change notification settings - Fork 195
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
Document only running hlint on changed files #1151
Comments
If they're useful including them in the readme makes sense. PR welcome! I'd suggest the FAQ section. As to the slowness, I'd be keen to know how slow using the latest HLint 3.2.1 which disabled one particularly slow hint. |
Good question. I think that specific optimization wouldn't come into play, since we already disabled it in
But I did run a couple tests: 3.2.1 (HLint v3.2.1, (C) Neil Mitchell 2006-2020): Run 1:
Run 2:
HLint v2.2.10, (C) Neil Mitchell 2006-2020 (This is what we currently use—we don't use 8.10 yet so we can't upgrade to 3.x for real is my understanding). Run 1
Run 2
This is for this much code:
|
Disabling a hint has no impact on performance - I generate the hint and then ignore it. It's possible in the future that we might optimise for hints that will be ignored, but since most hints are enabled most of the time, it's never been worth it. Great to see that HLint 3.2.1 is faster! I'd be curious to see a |
Sure thing. It looks like everything is almost no time at all (nothing is >= 0.1 seconds), so either the time spent isn't reflected here, or its just all adding up. I don't think this is a priority for us right now (the solution of only doing files that changed in git is really effective), but in case it is in the future, would you or someone else want to do contracting to optimize hlint based on running it on our codebase?
|
If you still are interested, |
|
Thanks for the info. We know there's lots of things to optimise in Match apply, so that seems like a reasonable avenue for future work. Glad to see there's little else though - the more concentrated the easier it is to improve. |
Hi, our team at work uses hlint, but it can get pretty slow on larger projects with tens of thousands of lines. We came up with this command to only run hlint on files that differ from the master branch on git. Would you want a PR that adds this tip to the README? Feels potentially out of scope, but would have helped us!
It's also helpful for refactoring:
The text was updated successfully, but these errors were encountered: