Hacker News new | ask | show | jobs
by jermaustin1 542 days ago
> I also get a lot of comments on my MRs about minor issues like spacing or formatting which only my tech lead cares about. Unfortunately my manager considered this as a bad thing.

I'm actually with your tech lead and your manager on this one. It is imperative that all team members are using the same code style. Its part of your IDE's settings.

While it is fun to debate tabs vs spaces, camelCase vs PascalCase vs snake_case, private _members vs private Members, but in the real world, you match the style of the project you are working on. Always.

2 comments

I would argue that it’s not really a tech lead if they haven’t setup their pipeline to include linting. It takes such a small amount of time, much less than posting comments about it on multiple tickets. Like who on earth cares about these things in 2024? You shouldn’t be capable or even reaching a point on a pull request without adhering to whatever standards are set in place by the tech lead.

There isn’t really a “right” answer. I tend to include the team in the decisions. Then once you’ve chosen a set of rules all you have to do is enforce them.

In general I also agree with this one, however I think that if a team really wants to enforce this, then at the very minimum should suggest the IDE to use and the settings to automatically correct formatting.

I suggest implementing a linter/formatter tool to be used with a pre-commit hook, so that it runs automatically and checks for this stuff automatically, avoiding you having to do it manually (mostly)

> at the very minimum should suggest the IDE to use and the settings to automatically correct formatting.

Yes, that is a given. I've never worked in a corporate environment where they didn't have a chosen IDE (from the small 4 employee company to the large multi-national defense conglomerate). Usually the company has an enterprise license, or at least will buy another seat/transfer a license when they hire a new dev.