Add Spotless formatting plugin#1483
Merged
Raibaz merged 1 commit intomockk:masterfrom Dec 26, 2025
Merged
Conversation
Signed-off-by: Jeremy Grunert <jgrnrt@gmail.com>
Collaborator
|
This is really huge. Would it be possible to split it in a couple different PRs to ease review? |
Contributor
Author
|
I know that it is huge, but splitting is not really feasible since the formatting changes touch so many files across the codebase. The main issue is that Spotless will fail the Gradle check if files aren't formatted with spotlessApply. We have a few options:
I'd strongly recommend option 1. The pain is upfront but temporary, and then the pre-push hook prevents future formatting issues. Dragging it out makes the codebase messier longer. Worth noting: The only functional change was updating one test that checked a line number - it shifted by +1 due to the formatting. Everything else is purely cosmetic. What do you think? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Spotless code formatting to the project via a new Gradle convention plugin and reformats existing code to match the style guidelines.
Changes
spotless.gradle.ktsconvention plugin.kt) and Kotlin Gradle (.gradle.kts) files are formatted using ktlintI recommend installing the pre-push Git hook with
./gradlew spotlessInstallGitPrePushHookto prevent pushing unformatted code.