Skip to content

[WIP] Use Spotless for Kotlin formatting #6420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Jul 18, 2025

Task/Issue URL:

Description

WIP until Spotless gets worktree support diffplug/spotless#2375

Steps to test this PR

Feature 1

  • [ ]
  • [ ]

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@mikescamell mikescamell changed the title Use Spotless for Kotlin formatting [WIP] Use Spotless for Kotlin formatting Jul 18, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2002:style:1:5: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead [shellcheck]

run: cat build/fladle/fladleResults/HtmlErrorReport.html | cut -d\` -f2 >> results.json

ratchetFrom means Spotless will apply only to files which have changed since origin/main

It also means we need to make some changes to CI due to ensure builds pass due to shallow clones. See https://github.com/diffplug/spotless/tree/main/plugin-gradle#using-ratchetfrom-on-ci-systems for more details.
Spotless breaks because we have classes and files that have been commited that should technically be ignored by our .gitignore settings. See diffplug/spotless#911 (comment)

Therefore we have to either remove these files or move them.

In this case the DeviceShield stuff was in a package called "report" which we ignore in .gitignore. Therefore I gave it a new package name

We want to keep the icon and I guess we want to keep the copyright folder so I made that work in .gitignore
As these have "changed" since develop then they need formatting!
@mikescamell mikescamell force-pushed the feature/mike/remove-kotlinter branch from 33a5226 to 4d354fc Compare July 24, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants