Amoral language
Fix #1584
I started by refactoring the relevant code, but in doing so I found some very strange semantics, as you'll see below. I assume this is a historical artifact of previous refactors but I'd appreciate a double-check first.
I couldn't figure out how to run the tests either, stack test doesn't seem to run any tests.
Regarding running tests - https://github.com/ndmitchell/hlint#how-to-run-tests
@googleson78 Aha nice! I just did that and it passed:
Tests passed (956)
But I'd like to do a bit more refactoring because the current code is definitely strange.
@ndmitchell what do you think?
I think no-loaded language is always better. I think "You can remove it" might be the clearest of all? At this point we believe it is definitely safe to remove, so I don't think we need to equivocate. But we also don't need to preach. Does You can remove it strike the right balance? Telling you what is safe, but leaving it up to you to take action?
I think no-loaded language is always better.
That sentence is so funny to me :P
I think "You can remove it" might be the clearest of all? At this point we believe it is definitely safe to remove, so I don't think we need to equivocate. But we also don't need to preach. Does
You can remove itstrike the right balance? Telling you what is safe, but leaving it up to you to take action?
I can make that change if you want, just let me know. I chose this wording because I've disagreed with hlint in the past and/or found bugs.
While anything in HLint can have bugs, I think we broadly have to assume it's right in the messaging, or it just gets way too confusing.
Reflecting on this further, I wonder if "Perhaps remove it" is the right balance? The perhaps turns it more into a dialog with the user - a suggestion. It doesn't suggest doubt in the validity of the hint, but it leaves all agency with the user?
Sorry for ratholing on the smallest things here @NorfairKing - genuinely curious what people think? I think this diff is definitely an improvement to the status quo, just wondering if more is even better?