Add style/lint checking to the CI flow.
trevjonez opened this issue · comments
https://arturbosch.github.io/detekt/ via gradle task.
probably a pile of things to resolve in doing this.
Ideally one commit for the addition of detekt configuration,
and one commit to fix issues detected (helps keep git blame --ignore-rev
viable)
Do you use intellij for editing? CMD+ALT+L creates weird formatting for me at the moment.
Steps which could be done to enforce code style (if you are interested of course):
- intelij 2017+ codestyle settings format https://confluence.jetbrains.com/display/IDEADEV/New+project+code+style+settings+format+in+2017.3
- official kotlin code style https://kotlinlang.org/docs/reference/code-style-migration-guide.html
- then choose the strategy for reformating current sources - all at once or file by file when touching
the .idea/codeStyles/
is in place already, but likely an old config. I say we go 100% official kotlin style to keep configuration of all these disparate tools at a minimum.
one commit for each step:
- configuration updates
- big bang reformat all the kotlin
- enable enforcement tool
detekt does much more than style so I'd like to use it if possible, but open to input on other options if there is an objectively better approach.
Do you use intellij for editing?
yes