Skip to content

feat: add credo and dialyxir for code quality checks #1547

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

Closed
wants to merge 2 commits into from

Conversation

abc3
Copy link
Contributor

@abc3 abc3 commented May 19, 2025

This PR adds Credo and Dialyzer to the project and configures them in a github action

Update: Removed auto-check from the GA, as Dialyzer is unhappy

to run locally:

mix dialyzer
mix credo

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 19, 2025
@dosubot dosubot bot added the reliability label May 19, 2025
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 19, 2025
@acco
Copy link
Contributor

acco commented May 30, 2025

@abc3 Thanks for this – looks like these are both setup to be optionally run, is that right? I don't think we're ready to add to our CI workflow, so it might not make sense to add them at all (because they'll just be failing)

Dialyzer
I don't think Dialyzer is worth the effort. We had "Dialyzer 0" on our last project, and I'm not convinced it was worth the ROI.

The investment:

  • Time to run CI/get PRs approved
  • Time invested to fix Dialyzer when it's broken in a developer environment
  • Time getting nerd sniped by a Dialyzer error that a developer can't help but try to identify/fix

The return was it caught a handful of bugs. Lot of other higher yield time investments to catch bugs or improve the system!

FWIW I still have Dialyzer running in my IDE and it can be helpful when building new stuff as part of the feedback loop.

Credo
I think there's a new emerging lib that's like Styler but for Credo? Ideally, the tools fix the issues vs tell us they are there.

@abc3
Copy link
Contributor Author

abc3 commented May 30, 2025

@acco Yeah, they are run optionally. I added them because of this comment. Dialyzer detects an issue with :eredis.qp. However, feel free to reject this PR if you don't think it's worth it.

@acco acco closed this May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reliability size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants