300
defilade (programming.dev)
submitted 1 month ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 17 points 1 month ago

I have vim setup to trim trailing white space, I get so pissed when a small change results in a 300 line diff because of poor code hygiene.

[-] [email protected] 22 points 1 month ago

Do ya’ll just not use linters?

[-] [email protected] 12 points 1 month ago* (last edited 1 month ago)

in my case it is a massive legacy codebase that I don’t actually control

i get very sporadic deliveries of it and I’ve version controlled them into a jank progression

the original is in clearcase with now git on top of it and my version control is in svn

there are very shitty unresolvable reasons for all of this

but this last update was especially bad as one of their new coders is super fucking OCD and rejustifying headers and footers and fucking comments, so whitespace shit in files he is not editing code in otherwise, so that is like 300-500 files not lines

i want to break a knee cap

[-] [email protected] 6 points 1 month ago

Linters won't necessarily help. You also need a code formatter that screams at you if you intent badly.

[-] [email protected] 4 points 1 month ago

I'm relatively new in my company and I've been hired to structurize and modernize the development. Project #1 I'm on, I've introduced bleeding edge things like pipelines with building, testing, etc., I've introduced renovate bot to keep us up to date, and I'll introduce linting next.

They will probably kill me, but no way I'll let them have > 2000 lines of code in one file.

[-] [email protected] 1 points 1 month ago

Linters aren’t MVP my dude

[-] [email protected] 1 points 1 month ago

https://github.com/axelf4/vim-strip-trailing-whitespace

There are plugins that will only trim modified lines, which resolves that issue

[-] [email protected] 1 points 1 month ago

That’s a nice idea

Probably a bit more sophisticated than my regex solution.

this post was submitted on 16 May 2025
300 points (98.1% liked)

Programmer Humor

24709 readers
278 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS