-
Notifications
You must be signed in to change notification settings - Fork 1
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
Setup Pre-Commit Hook to Run Tests & Dogma #10
Comments
Hoping someone else has discovered an elegant way of doing this in without resorting to node.js ... dwyl/learn-pre-commit#6 (comment) |
How about this one https://github.com/dwyl/elixir-pre-commit @nelsonic? Currently in the process of adding it although encountering an error with |
@Cleop yeah, I just wanted help from someone to implement it. 😉 |
Came across these re broken credo on the credo repo: Changing the credo line as the second comment suggests got it running successfully on More on the same here: rrrene/credo#469 Maybe I'm best off adding my feedback to the credo repo too, despite the fact it's supposedly been fixed there... looks like some other people are still experiencing the problem: @nelsonic @SimonLab - what do you think? Just want to make sure I've not overlooked anything? |
I've asked directly on the credo repo here on an update/ advice: rrrene/credo#495 (comment) |
Response from @rrene shared these links:
Credo fails with an exit status != 0 if it shows any issues. This enables shell based pipeline workflows (e.g. on CI systems) which test Credo compliance. These are the scores of exit statuses that credo emits based on any shortcomings in your code: Therefore the reason the pre-commit is failing is because we're not exiting with an exit status of 0 because of the amendments that could be made to the code. So to solve this issue we need to resolve the credo suggestions to give an exit status of 0. |
…e-commit hooks which are now handled in Elixir-land! #10)
as a developer I don't want to have to remember to run the linter (dogma)
each time I commit my code ...
I want it to run automatically!
see: https://github.com/dwyl/learn-pre-commit
e.g: https://travis-ci.org/dwyl/hits-elixir/builds/274319451#L689
where the tests pass but the "dogma" code style fails...! 🙄
The text was updated successfully, but these errors were encountered: