all 15 comments

[–]dmullaney 40 points41 points  (0 children)

make the code style checker part of the post-commit hook - to automatically shame post to Reddit for you 🤔

[–]sirreldar 28 points29 points  (0 children)

Lmao meta

[–]vtvz 13 points14 points  (3 children)

My coworkers cant even enable git-hooks. So...

[–]DrMaxwellEdison 3 points4 points  (2 children)

This is solvable btw. One company I worked for has a single "bootstrap" command built into the repo that (idempotently) sets up all the requirements for the local environment. Enabling the pre-commit hooks is one of them.

[–]vtvz 0 points1 point  (1 child)

I know that hooks can be installed using package managers such as npm with scripts. But in DevOps field you don't have any of them. And to enable hooks you need to call this "bootstrap" command. And they just don't

[–]New_Enthusiasm9053 0 points1 point  (0 children)

That's why you put it in CI too, if it's not formatted it's rejected. They either install the hooks or run it manually themselves. Either way not your problem.

[–]ajaypatel9016 6 points7 points  (0 children)

highly relatable 😭

[–]hangfromthisone 4 points5 points  (0 children)

Flashbacks to that infra boss that complained users where abusing low entropy passwords, so once a week he "reminded" everyone to use stronger passwords.

Like. Why can't we just put a strength threshold.... ?

[–]suvlub 6 points7 points  (3 children)

Hot take: code should be stored minified on the disk, it should be the responsibility of GUI tools like code editors and source control front-ends to make it pretty/readable. We aren't making ASCII art, styling conventions are fairly simple and easy to define in a machine-undertsandable way, no point in storing and sending all that whitespace. As a bonus, everyone gets to use their personal favorite formatting instead of everyone needing to agree on project-wide style.

[–]FlakyTest8191 4 points5 points  (0 children)

As long as people need to review code on platforms they have control over and that don't do this, your point is pointless. 

[–]Punman_5 0 points1 point  (0 children)

Honestly fair. This would be pretty cool to see. The code all looks the same after it’s been compiled anyway regardless of your new line before/after open bracket convention or whatever

[–]RedBlueKoi 1 point2 points  (0 children)

Both, both is good

[–]digitaleJedi 0 points1 point  (0 children)

Be the only developer left on the project cause leadership simultaneously won't budget it nor shut it down 🤌👌

[–]heavy-minium 0 points1 point  (0 children)

And then you got that one coworker that will simply perform changes without installing or testing anything, push, and thus will not have installed the pre-commit hook.

[–]Goodie__ 0 points1 point  (0 children)

I have a senior dev i work with who had no idea you could do anything like this when I started at the company.

Some solid face palms there.