logoalt Hacker News

CharlieDigitalyesterday at 6:52 PM3 repliesview on HN

This is how some folks on my team work. Ran into this when I saved a file manually and the editor ran formatting on it. Turns out that the dev that wrote it only codes via CLI though reviews the files in an IDE so he never manually saved it and ran the formatter.


Replies

atomicUpdateyesterday at 7:02 PM

I expect the formatter/linter to be run as part of presubmit and/or committing the code so it doesn't matter how it's edited and saved by the developer. It's strange to hear of a specific IDE being mandated to work around that, and making quick edits with tools like vi unsupported.

show 1 reply
tyreyesterday at 7:09 PM

allow me to introduce you to the lord and savior, https://pre-commit.com/

show 2 replies
whalesaladyesterday at 8:20 PM

Part of a healthy codebase is ensuring that anyone can hack on it, regardless of their editor setup. Relying on something in .vscode and just assuming people are using that editor is what leads to this kind of situation.

Bake that into the workflow some other way.