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
Whenever we create a new project with the elixir template, there are more files with the single alias syntax.
Specifically in the conn_case, data_case, and project_name_web files
importEcto.ChangesetimportEcto.Query
We cannot manually convert them into multi-alias syntax as in the conn_case and project_name_web files use quote do and scope different aliases over multiple functions.
Credo will treat the project as using only single alias and raise false positives when we use mutli alias syntax
We mostly create a workaround for this by ignoring the offending files that aren't fixable and fixing files that can be (like data_case)
Solution
When applying the Credo addon, edit the credo config to ignore the offending files and fix data_case manually
Expected
Can use Multi Alias syntax in a newly created Elixir project with the template without raising credo error.
Steps to reproduce
Create a new Elixir Project using the template
Add one Multi-line alias syntax (e.g. import Ecto.{Changeset, Query}
Run credo or mix codebase and observe error
The text was updated successfully, but these errors were encountered:
Issue
Whenever we create a new project with the elixir template, there are more files with the
single alias
syntax.Specifically in the conn_case, data_case, and project_name_web files
We cannot manually convert them into multi-alias syntax as in the
conn_case
andproject_name_web
files usequote do
and scope different aliases over multiple functions.Credo will treat the project as using only
single alias
and raise false positives when we usemutli alias syntax
We mostly create a workaround for this by ignoring the offending files that aren't fixable and fixing files that can be (like
data_case
)Solution
When applying the Credo addon, edit the credo config to ignore the offending files and fix data_case manually
Expected
Can use
Multi Alias syntax
in a newly created Elixir project with the template without raising credo error.Steps to reproduce
import Ecto.{Changeset, Query}
mix codebase
and observe errorThe text was updated successfully, but these errors were encountered: