jwstegemann / fritz2

Easily build reactive web-apps in Kotlin based on flows and coroutines.
https://www.fritz2.dev
MIT License
636 stars 25 forks source link

Set up Spotless #786

Closed serras closed 11 months ago

serras commented 11 months ago

Closes #103

This sets up Spotless using ktlint as back-end. Some rules like following filename rules are disabled, because the project doesn't really follow them.

Note that the PR seems big, but most of the changes are due to running spotlessApply to apply the linter rules consistently.

jamowei commented 11 months ago

If I see this right, spotless seems to be more an code formatter!? But detekt, as I know, tries to find bad code and do some analysis. Or does spotless do the same analysis and also format the code in one way? So then it would be an replacement for detekt.

@serras From your point of view is there anything against detekt or what are the key difference between detekt and spotless?

serras commented 11 months ago

@jamowei I actually was not aware that Detekt integrates Ktlint, so with only Detekt you can have both. I'm closing this and working on #787 instead.