mau013
Which Credo plugins are you using?
Hi everyone,
I have just added Credo to my project and I really liked it. I would like to take it a step further and implement further checks via plugins but I’m struggling to find a list of them… so my questions for you all are:
- Which Credo plugins are you using (if any)?
- Is the community gravitating towards a common set of checks other than those included in Credo itself?
Thanks a ton for any help.
Most Liked
D4no0
This results in the same conclusion as the elixir formater arrived to:
The consistency over every random project you can open on the internet makes them more readable and easier to understand, simply because everyone formats/writes code in a similar style.
sodapopcan
Adobe has some. I know there are others but none off the top of my head.
There are definitely a lot of style plugins that are up to personal taste and I think should stay that way, so I’d suggest looking through the disabled ones that come with Credo as there are some good ones! I particularly like the one that forces you to always pass the :async option to use ExUnit.Case. This way you can be relatively sure that whoever set it did so for a reason and didn’t absent-mindedly choose the default.
pdgonzalez872
Default, not even having a credo file.
Just having something in place gets you 80% there, if not more. You get diminishing returns as you add more, the value it provides starts decreasing after a while, especially in big teams. Checks that are disabled/added because someone that left 3 years ago didn’t quite like it/or thought it was amazing at the time will haunt you later on.
IMO, your miles may vary.
sodapopcan
Consistency, even within private projects, is the number one reason I care to use Credo, though the code suggestions are nice too since I don’t use any AI tools.
Big teams, period, is where the deminishing returns are
If people are spending long periods of time arguing over what should go in Credo, or people are adding stuff without telling anyone, there are bigger problems at play. All that to say is that I generally agree the default is ideal, but for me the defaults are a little much and are just there to guard against juniors. Like:
Also stuff like “alias all the things” and “no single pipes” are things that are context-dependent AFAIC. Useful if you’re just letting anyone loose on your codebase, not for my own things.
katafrakt
I remember we have one custom to check if the migration version is a correct timestamp and if it’s not far in the future. The story behind it is that we had some people that liked to touch migration files by hand, without the generator, and at some point we have a migration with timestamp from the future, so every time you wanted to rollback your newly created migration, it rolled back that one instead.
Apart from that I sometimes advocate to have a check forbidding “full imports”. I used it as an example in this article. The check is not perfect IIRC, but bypassing it takes some dedication.
We also use checks from excellent_migrations, but lately I see many people disable them immediately in their migrations, so I guess we have to reevaluate.







