How to setup Ktlint for your project in android
Introduction: Ktlint is a formatting tool which is used to maintain a standardization in code across the project. Why to use it : Spending time on configuration (& maintenance down the road) of hundred-line long style config file(s) is counter-productive. Instead of wasting your energy on something that has no business value - focus on what really matters (not debating whether to use tabs or spaces). How it helps : Maintaining a quality code when multiple people are working on the project, If forces certain checks such as extra line, spacing, removing wild card imports, semicolons, no tailing white spaces, no unit returns, no empty class bodies, etc.. Operating System: (Setup-MAC) Install KtLint locally on the system Git Hook not to allow pushing code with lint errors Run KtLint on all the kotlin files in the src folder Auto correcting style violations, If some errors cannot be fixed, They will be printed Operating System: (Setup-Windows) Adding the git pr...