Skip to content

Fix spotlessCheck failing with 0 lint errors on stale clean files - #3189

Merged
nedtwigg merged 1 commit into
diffplug:mainfrom
dualfroz:fix/2992-check-empty-lints
Nov 20, 2026
Merged

nedtwigg merged 1 commit into
diffplug:mainfrom
dualfroz:fix/2992-check-empty-lints

Conversation

@dualfroz

Copy link
Copy Markdown
Contributor

when spotless-clean only has files that already match whats on disk, getUncleanFiles skips them but SpotlessCheck then fell into the lint branch and threw There were 0 lint error(s) with nothing in the lints dir. from what i can tell thats what happens after clean openApiGenerate spotlessApply in the issue, so now it only throws when there are actual lints. added a test for it plus a changelog entry. Fixes #2992

When `spotless-clean` only holds files which already match the source
on disk, `getUncleanFiles` skips them, but the check then fell through
to the lint branch and failed with "There were 0 lint error(s)" even
though there were no lints. Only report lints when there are any.
@nedtwigg
nedtwigg merged commit 4049316 into diffplug:main Nov 20, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GradleException when multiple goals leave behind spotless-clean dir

2 participants