3 ms·
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
by noahjk 2y ago
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.
- asdajksah2123 2y agoThis 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.
- tele_ski 2y agoIt'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.
- maccard 2y agoI’d like to think that GitHub would be able to display with my editor format settings.
- ruined 2y agothis works for pure formatting, but falls apart when you start linting to exclude certain syntax or patterns
- withinboredom 2y agoThis 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...