Skip to content

Pre-commit hook does not check test pass/failure before allowing commit ... #112

@nelsonic

Description

@nelsonic

I'm trying to debug why a test is not passing for #35
and when I attempt to make a commit on my branch (where tests are failing)
I am not prevented from doing so ...

image

pre_commit is in the mix.exs file:

{:pre_commit, "~> 0.2.4", only: :dev},

But it's unclear what command is being run on the pre-commit hook ...

# Configures pre-commit commands
config :pre_commit, commands: ["credo --strict", "test"], verbose: true

Why is the pre-commit defined in prod.exs ?

It would be desirable to have the pre-commit run on localhost i.e. dev.exs ...
@SimonLab / @Cleop thoughts...?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions