Re:Software development topics I've changed my mind on after...
by noahjk on Wednesday February 05, 2025 @09:53AM
(#42949255)
Maybe a new paradigm for code formatting could be local-only. Your editor automatically formats files the way you like to see them, and then de-formats back to match the codebase when pushing, making your changes match the codebase style.
[ Parent
| on HN ]
Re:Software development topics I've changed my mind on after...
by tele_ski on Wednesday February 05, 2025 @10:24AM
(#42949766)
It's a decent idea, but it's weird reviewing code you wrote in saying GitHub, it looks totally different. Imo not a show stopper but a side effect you have to get used to.
Re:Software development topics I've changed my mind on after...
by maccard on Thursday February 06, 2025 @08:38AM
(#42962163)
Iād like to think that GitHub would be able to display with my editor format settings.
Re:Software development topics I've changed my mind on after...
by asdajksah2123 on Wednesday February 05, 2025 @10:25AM
(#42949774)
This is pretty common now. At least my Vim/git combo does this, where I always open source code with my preferred formatting but by the time it's pushed to the server it's changed to match the repo preferences.
Re:Software development topics I've changed my mind on after...
by ruined on Wednesday February 05, 2025 @11:00AM
(#42950418)
this works for pure formatting, but falls apart when you start linting to exclude certain syntax or patterns
Re:Software development topics I've changed my mind on after...
by withinboredom on Wednesday February 05, 2025 @02:43PM
(#42954006)
This is disastrously easy to implement with just a few filters on git (clean & smudge).
I highly recommend it though, especially if you worked for a long time at one company and are used to a specific way of writing code. Or if you like tabs instead of spaces...