![]() This amounts to unnecessary extra work and when you add up the time spent doing this per PR that has indentation issues, you would realize it’s a lot of time that could have been spent doing more productive tasks. It wasn’t too much of an issue for me while working locally in my IDE but since I work in a team where other Engineers would need to review my code, having consistent coding styles across files became very important.Īs a short-term fix, I would always confirm the indentation style being used by each file I made changes to and then tweak my IDE indentation style to be the same. But after checking out the code with my IDE whose default setting is tabs, all of my changes in any file used that same tab indentation and that was where the problem started. The issue here was that some files in the repository I worked with use space indentation while the newer files use tab indentation. I was always having PR comments on spacing/indentation and it became a headache when in one of my PRs, I had several such comments. My initial pull request had a few bugs which I fixed but the ones that seemed distracting were comments around spacing and tabs. I was using IntelliJ IDEA since most of the codebases I’m working on revolve around Java. ![]() I joined a new team almost a year ago and after my onboarding with other engineers across several of their codebases, it was time to start making code contributions. Are you working on a project with other developers where reading code is not as fun as you would want because of inconsistent coding styles? In this article, we’ll have a look at how to achieve painless code formatting with EditorConfig.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |