Skip to content
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

Proposal for our own HLint rules #704

Merged
merged 1 commit into from
Nov 16, 2014
Merged

Proposal for our own HLint rules #704

merged 1 commit into from
Nov 16, 2014

Conversation

mgajda
Copy link
Contributor

@mgajda mgajda commented Nov 9, 2014

Since style discussions have gathered a lot of attention, I propose to expand the library of our own HLint style hints.

To use: hlint --hint=HLint.hs src/library and enjoy!

I believe there is Emacs mode that can automatically apply hints that you select.

@mgajda
Copy link
Contributor Author

mgajda commented Nov 9, 2014

PS And note that there are many places within the code and commit comments that suggest that the author would like somebody else to participate in cleaning up of this code base... might be nice way of getting familiar with it, just as is extending the keymaps.

@Fuuzetsu
Copy link
Member

Fuuzetsu commented Nov 9, 2014

Looks OK but I'm -1 on fromMaybe warning, fromMaybe sucks for any non-trivial case.

@jhance
Copy link
Member

jhance commented Nov 9, 2014

fromMaybe also only works well if there is no complex logic involved in the Nothing case, which isn't necessarily true

@mgajda
Copy link
Contributor Author

mgajda commented Nov 10, 2014

That's why I marked it as just a warning. But in the common case that it is a constant, I would define a constant for the default argument a.

mgajda added a commit that referenced this pull request Nov 16, 2014
Proposal for our own HLint rules
@mgajda mgajda merged commit 960e14f into yi-editor:master Nov 16, 2014
@mgajda mgajda deleted the HLint branch November 16, 2014 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants