maks / MGit

A Git client for Android.
https://manichord.com/projects/mgit.html
GNU General Public License v3.0
1.25k stars 167 forks source link

add and use AS code format config #216

Open maks opened 7 years ago

maks commented 7 years ago

Use std AS config: 4 space indent, std import sorting etc. Also drop using m prefix for class member names. Need to remove config file in .idea/ from .gitignore Would be good to have this as a lint check and enforced via CI builds, not sure if this is possible though? @marukami have you done this before?

marukami commented 7 years ago

.idea has a lot of stuff. I think we can use !.idea/codeStyleSettings.xml and that should work.

marukami commented 7 years ago

You can use something like Husky to make it simple to add git hooks that work consistently across Windows, macOS, and Linux. Not sure how you would add a check to Travis.

maks commented 7 years ago

No sorry I meant as part of the build (in gradle) and then CI will pick it up automatically, just like existing lint. Probably a lint config somewhere already. I'll look into it when I get a chance.