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

One arity function in :plugins opt #28

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

paveltyk
Copy link
Contributor

@paveltyk paveltyk commented Nov 21, 2023

📖 Description and reason

Currently, :plugins option supports only :phoenix. It would be nice to add some flexibility by supporting one arity function.

In my case the project folder structure does not match with the Phoenix naming convention, i.e. instead of app_web I have app_api. That prevents the predefined :phoenix plugin to do its' magic. This PR will allow for plugins: [&MyApp.Credo.check_module_fIlename/1]

👷 Work done

Tasks

  • Update tests
  • Update Readme

Additional notes

Consider passing module name in :plugins opt. This will follow the Open Closed principle, i.e. plugins: [CredoNaming.Check.Consistency.ModuleFilename.Plugins.Phoenix]

🎉 Result

Not needed

🦀 Dispatch

#dispatch/elixir

@remi
Copy link
Member

remi commented Nov 21, 2023

Hi @paveltyk,

That’s great! Regarding this:

Consider passing module name in :plugins opt. This will follow the Open Closed principle, i.e. plugins: [CredoNaming.Check.Consistency.ModuleFilename.Plugins.Phoenix]

I agree! I’ll make the change in README.md after merging this.

@remi remi merged commit c6b31a4 into mirego:main Nov 21, 2023
4 checks passed
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.

2 participants