Remove the `spotlessDiagnose` task from the gradle plugin

Open
#2,721 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start with plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessDiagnoseTask.java, then search the Gradle plugin for references to the spotlessDiagnose task. Remove the task and its registrations or references, and verify that the Gradle plugin still builds and no longer exposes that task.

Written by the indexing model from the issue text.

Description

Some formatters have idempotency bugs. Spotless has a padded cell feature which can fix them.

A long time ago, this feature was off by default. A user would get an error related to idempotency, they could run spotlessDiagnose to understand it, and then they might turn on the padded cell feature.

In 3.29.0 released May 2020 we made padded cell mandatory, so idempotency problems are always silently fixed.

The maven plugin has never had a "diagnose" task. Probably no one would notice if we removed it from the Gradle plugin also.

Here is the code:

https://github.com/diffplug/spotless/blob/88c83de2450b8fad8174ff08a5c95fa18a915617/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessDiagnoseTask.java#L34-L77

And here is info on some tech debt that it has accumulated. Probably better to just delete it than fix it. Anybody object?

Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.