Skip to content

Using paddedCell, spotless is not idempotent (check passed but apply is not a noop) #338

Closed
@kennknowles

Description

@kennknowles

On apache/beam#7505 ./gradlew spotlessCheck passed (you can see it in the Jenkins statuses) but ./gradlew spotlessApply is not a noop, we discovered afterwards.

I confirmed that with paddedCell disabled spotlessCheck failed.

Gradle version: 4.10.3
Spotless plugin version: 3.16.0
GoogleJavaFormat: 1.7
Operating system & version: various Mac & Linux
Configuration block (also easy to see in the PR):

def disableSpotlessCheck = project.hasProperty('disableSpotlessCheck')
spotless {
  enforceCheck !disableSpotlessCheck
  java {
    licenseHeader javaLicenseHeader
    googleJavaFormat()

    // Details see: https://github.com/diffplug/spotless/blob/master/PADDEDCELL.md
    paddedCell()
  }
}

Errors emitted: none

If you are submitting a bug, please include the following:

  • summary of problem
  • gradle or maven version
  • spotless version
  • operating system and version
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace

If you're just submitting a feature request or question, no need for the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions