question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kennknowlescommented, Feb 10, 2019

Try d05da8cf3dd74b2e5496ca85c10f0965c68cadf5. I just repro’d on a mac. Just clone, check out that commit and ./gradlew spotlessCheck passes but ./gradlew spotlessApply changes a ton of files.

0reactions
kennknowlescommented, Oct 4, 2019

Nice! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.diffplug.spotless.PaddedCell.check java code examples
Returns true iff the formatter misbehaved in any way (did not converge after a single iteration). steps. Returns the steps it takes to...
Read more >
Idempotency Explained (REST API and Terraform) - YouTube
dev #engineering #tutorial #computerscienceA quick tutorial on what an idempotent operation is and some examples in software and operations ...
Read more >
Spotless gradle plugin not working on closed system
I am using spotless-plugin-gradle 3.25.0. My build.gradle contains plugins { id 'java' id 'eclipse' id 'maven-publish ...
Read more >
wordlist.e9ec7c7921b3.txt - Three Pins
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found