Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

add husky to prevent pushing failing code #13151

Merged
merged 1 commit into from
Mar 8, 2017
Merged

add husky to prevent pushing failing code #13151

merged 1 commit into from
Mar 8, 2017

Conversation

zaggino
Copy link
Contributor

@zaggino zaggino commented Mar 6, 2017

this is just two lines, but it makes a significant change, consider it a proposal

basically, when you do git push, husky runs prepush script and if it fails, it won't allow you to push unless you override it with a command line parameter

advantages are clear, people won't push any code that doesn't fit our settings, while disadvantage is that it slows down the push (but how often you push anyway?)

@zaggino zaggino requested review from petetnt, ficristo and swmitra March 6, 2017 02:16
@ficristo
Copy link
Collaborator

ficristo commented Mar 6, 2017

I like to prevent bad commits. I only wonder if this could be a contributor barrier.
I'm fine either way so I defer this one to the others.

@ficristo ficristo removed their request for review March 6, 2017 19:46
@ingorichter
Copy link
Contributor

I think everything that keeps the code base clean and tidy is worth a look and try. I don't think that the additional check doesn't introduce a barrier for contributors.

@petetnt
Copy link
Collaborator

petetnt commented Mar 7, 2017

I just ran into lint-staged which can be used to lint (and --fix) files before committing which might be of use: https://github.com/okonet/lint-staged

@swmitra
Copy link
Collaborator

swmitra commented Mar 8, 2017

I just love the idea of this check @zaggino 👍. I don't think it's going to slow down development as any sanity check failure has to be worked on immediately to pass the build. So either we work after a bad commit or while doing it. But this check can at least save a bad commit. I am all in for this 😄 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants