Skip to content
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] add husky to prevent pushing failing code #11155

Open
core-ai-bot opened this issue Aug 30, 2021 · 4 comments
Open

[CLOSED] add husky to prevent pushing failing code #11155

core-ai-bot opened this issue Aug 30, 2021 · 4 comments

Comments

@core-ai-bot
Copy link
Member

Issue by zaggino
Monday Mar 06, 2017 at 02:16 GMT
Originally opened as adobe/brackets#13151


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 included the following code: https://github.com/adobe/brackets/pull/13151/commits

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Monday Mar 06, 2017 at 19:46 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by ingorichter
Monday Mar 06, 2017 at 21:01 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Tuesday Mar 07, 2017 at 22:42 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Wednesday Mar 08, 2017 at 07:58 GMT


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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant