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

[Chore] Update credo config to support check private vs public functions order #256

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

byhbt
Copy link
Member

@byhbt byhbt commented Sep 7, 2022

What happened 👀

  • Update the .credo.exs to support the convention Prefer placing all private functions at the bottom of the module. on Compass:

image

Link: https://nimblehq.co/compass/development/code-conventions/elixir/#module

Insight 📝

We need to ignore the check for ignore: ~w/callback_impl/a because the generated template Phoenix does not consistently follow this layout, for example:

Therefore, we ignored the callback_impl to keep the .credo.exs follow the existing output of the generated Phoenix structure, just support for the public and private method function order verification.

Proof Of Work 📹

The tests should pass and the .credo.exs output should contain public_fun private_fun

image

@byhbt byhbt self-assigned this Sep 7, 2022
@byhbt byhbt force-pushed the chore/credo-public-private-func-order branch from c10c417 to c600726 Compare September 7, 2022 08:26
@byhbt byhbt marked this pull request as ready for review September 8, 2022 02:40
@byhbt byhbt requested a review from a user September 8, 2022 02:40
@byhbt byhbt changed the title Update credo config to support check private vs public functions order [Chore] Update credo config to support check private vs public functions order Sep 8, 2022
@byhbt byhbt modified the milestones: 4.4.0, 4.3.0 Sep 8, 2022
Copy link
Member

@andyduong1920 andyduong1920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @byhbt

@byhbt byhbt merged commit 9b323c1 into develop Sep 8, 2022
@byhbt byhbt deleted the chore/credo-public-private-func-order branch September 8, 2022 11:17
@byhbt byhbt mentioned this pull request Sep 30, 2022
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.

4 participants