Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Last guy who I heard say this decided he didn't need to conform to the style guide because "his way" was better.
Yeah... It wasn't. -
I love not being able to commit a because b has 'unused methods', I ONLY WANT TO COMMIT A FFS!
-
Root797582y@ElectroArchiver Reminds me of my current employer’s doublethink:
“Use git to back up your work”
and
“Don’t commit broken code” -
Voxera113882y@ElectroArchiver but that does mot mean that the idea of precomit hooks are but, just that most are bad at using them :)
And yes, that is a good reason to be weary of them and really think about what purpose you want them for.
They should be as a complement to push validation on the server and to avoid pushing something that will not be accepted anyways.
We have one that ensures that all commits start with what looks like a jira ticket id since all commits must be in reference to a jira.
It will not check if its a valid ticket, that is handled by the git server which will reject it if the jira does not exist, but it ensures that you did not forget to add it and that you formatted it in a way the server would understand at least, saving you time, especially if you where to push multiple commits, would be sad if the first was wrong :) -
@Voxera Sure, though they should also work,..
some I have had the pleasure to use didn't work with GitHub Desktop for example,.. fun. -
I agree. I wasn't there when they set it up, but no one uses them and they have some arbitrary and stupid rules like "no fullstop at the end of the sentence".
Pre commit hooks serve no other purpose than to be annoying.
question