You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today the Credo.Check.Readability.AliasAs errors for any use of the :as option on aliases. My problem with that is that there are some module that you don't have control over their names and they're poorly named to not use the :as option.
In my case, specifically the module MyAppWeb.Router.Helpers from Phoenix, if I don't use as: Routes option like the suggested by phoenix generator, we should be using Helpers.page_path(conn, :index), which is a lot less clear than Routes.page_path(conn, :index).
Which existing behaviour would change?
There would not be any backwards incompatible change. The only thing would be that one would be able to set something like {Credo.Check.Readability.AliasAs, ignore: [MyAppWeb.Router.Helpers]} on .credo.exs and all modules on this list would be ignored on this check.
The text was updated successfully, but these errors were encountered:
What do you want Credo to do?
Today the
Credo.Check.Readability.AliasAs
errors for any use of the:as
option on aliases. My problem with that is that there are some module that you don't have control over their names and they're poorly named to not use the:as
option.In my case, specifically the module
MyAppWeb.Router.Helpers
fromPhoenix
, if I don't useas: Routes
option like the suggested by phoenix generator, we should be usingHelpers.page_path(conn, :index)
, which is a lot less clear thanRoutes.page_path(conn, :index)
.Which existing behaviour would change?
There would not be any backwards incompatible change. The only thing would be that one would be able to set something like
{Credo.Check.Readability.AliasAs, ignore: [MyAppWeb.Router.Helpers]}
on.credo.exs
and all modules on this list would be ignored on this check.The text was updated successfully, but these errors were encountered: