Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
willol13898y@FullRandom no he's not. Autoformat fucks up the commit, it is to be used with great care (and the OP doesn't seem to be that careful)
-
netroxen2438y@willol Point taken, but still. For things like CSS, I think it's great for unifying the syntax, especially when you're working in a team where one guy uses 4 tab and the other 2, or indented selectors or not... Whatever way you look at it, it serves its purpose...
-
willol13898y@netroxen if not everybody uses the same style, what are you gonna do? Auto format everything to your liking? Then the next guy re-format to his liking ?
If you work in team, you need a common standard. If the standard is not respected, the commit isn't merged, period. That's what linters are for -
willol13898y@netroxen well I sound harsh here but that's how it works in real life! You don't mix standards in a project, it would be hell to read.
And anyway respecting standards is really easy, linters tells you if you don't and all IDEs have linters plugins!
Autoformat. My boss hates it when I use it, he tells me if I do it again I'll get some pain. Namely because autoformat mixed in with code changes is ugly, that's understandable. But he's barred me from using it entirely, although I find it useful when working in Python or CSS... So to circumvent this I make a separate commit with "cleanup", however I sometimes forget to do this... I know I've forgotten, because my boss calls my name from the room next door. I get up, step inside his office and - "Don't use f****** autoformat!". Well FML.
undefined
clean code is essential