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

Add an option to enforce parens or not in zero-arity defs #673

Merged
merged 1 commit into from Jul 12, 2019
Merged

Add an option to enforce parens or not in zero-arity defs #673

merged 1 commit into from Jul 12, 2019

Conversation

whatyouhide
Copy link
Contributor

@rrrene I'm not sure this aligns with the direction you see for Credo. In the Elixir formatter, we went with a clear decision: the formatter is as opinionated as possible, and configuration is the enemy. However Credo seems to be used as a linter more geared towards consistency: for example, look at all the consistency checks which don't enforce a specific style bur rather just a consistent one. For this reason, I think that it might be nice to be able to configure some checks like the one in this PR. I didn't go with any other checks as I want to test the waters first, and get the discussion started on this. Let me know your thoughts! :)

@whatyouhide
Copy link
Contributor Author

@rrrene ping! 🚂

@rrrene
Copy link
Owner

rrrene commented Jul 12, 2019

Hi, sorry, I was still in vacation-mode.

This is great. Thank you! 👍

In an ideal world, this would also be a consistency check that automatically catches your most used pattern. But consistency checks are slow (at least for now) and therefore I think this is a great addition! 🎉

@rrrene rrrene merged commit 39e3f2f into rrrene:master Jul 12, 2019
@rrrene
Copy link
Owner

rrrene commented Jul 17, 2019

@whatyouhide FYI: This was released in the latest version of Credo (v1.1.1).

@whatyouhide
Copy link
Contributor Author

Sweet, thank you @rrrene! 💟

supersimple added a commit to supersimple/credo that referenced this pull request Aug 16, 2019
rrrene added a commit that referenced this pull request Aug 20, 2019
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.

None yet

2 participants