question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run pre-commit hook before the prompt

See original GitHub issue

I use pre-commit hooks to format my code and check with npm audit for insecure modules. There are times I run through the whole commit prompt only to have my pre-commit hook(s) fail and have to redo my commit message.

I think it would be great if the cli ran pre-commit hooks before the prompt much like it checks that some files have been added to staging.

I’m happy to work on a PR, just curious what the community thinks.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:30
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
ad1992commented, Jan 20, 2019

@dkimot @LinusU I still think we should not allow the cli to run if pre-commit hook fails. what do you guys think ?

5reactions
ad1992commented, May 5, 2019

We shouldn’t allow the the cli to run if pre-commit hook fails and also if files are not added. Did everyone agree on this ? Is anyone working on this ? Or Can I take this up ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pre-commit
Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically...
Read more >
Trusting a Git pre-commit hook to Run Checks Automatically
The pre-commit hook gets called first before any memory is used for the commit object. The prepare-commit-msg hook gets called when Git checks ......
Read more >
git prompting me before commit - Stack Overflow
The pre-commit hook is run first, before you even type in a commit message. It's used to inspect the snapshot that's about to...
Read more >
Pre-Commit Hook Example in GitKraken Client | Git Hooks ...
First navigate to the hooks directory for the target repo. Open a Visual Studio Code window and navigate to repo .git hooks. From...
Read more >
How to use git pre-commit hooks, the hard way and the easy ...
The hook runs before a commit is accepted to git, and if the hook script fails (ie if it returns a non-zero exit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found