ProjectSWGCore / Holocore

This is the Star Wars Galaxies server emulator for the Java Virtual Machine
https://www.projectswg.com
GNU Affero General Public License v3.0
30 stars 20 forks source link

Kotlin linting #1344

Open madsboddum opened 1 year ago

madsboddum commented 1 year ago

Requirements

Inspiration:

Kotlin linter: https://pinterest.github.io/ktlint/0.50.0/ There's a Gradle plugin for it: https://github.com/JLLeitschuh/ktlint-gradle

This linter supports .editorconfig files, which IntelliJ can export its code style as.

There's also a GitHub action: https://github.com/marketplace/actions/github-action-for-ktlint ... which can apparently generate annotations where the issues are.

This Action generates annotations from ktlint Report XML.

madsboddum commented 6 months ago

We could also consider running the IntelliJ inspections. The benefit is that these are already very integrated into the existing workflow locally, and the same settings can be shared with the CI/CD pipeline.

We would need to either bring down the amount of inspection problems in the codebase to 0 or only include new inspection problems somehow. The latter is much more difficult, and we should want to have a codebase free of inspection problems anyway.

This could lead to either inspection profile tweaks or code changes.