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.

Add an ignoreFailures property

See original GitHub issue

Like pmd, checkstyles, findbugs plugins.

when ignoreFailures = true the build doesn’t fail.

spotless {
   ignoreFailures = true
  ...
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
nedtwiggcommented, Apr 1, 2017

I am not against formatting always. I am against checking the formatting always.

If you format always, then the check will always pass 😃

if the plugin was such that Java’s check dependsOn spotlessApply

Then I could commit code with formatting errors, upload it to CI, and it would pass CI. And the commit history would be hard to read, because there would be meaningless formatting changes obscuring the changes that matter.

This commit has 16 changed lines. 2 of them matter, the other 14 are formatting noise which makes it harder to review the content of the change. If check depends on spotlessApply, CI cannot catch this.

1reaction
nedtwiggcommented, Jul 1, 2020

Formatting is not important. The point of Spotless is to take that discussion off the table - this is how this project is formatted, period, so let’s talk about the content instead of the formatting.

You’re looking at Spotless, so you’ve decided that you’d like for your code to be formatted a specific way.

You’re opening a new discussion - when should my code be formatted the way I want it to be formatted? to which there are three possible answers:

  1. Never (if you’re using Spotless, then that’s not what you want)
  2. Sometimes
  3. Always

Always is simple. Formatting is not important, so I think the simple answer is the best answer, and the right default for Spotless.

Sometimes is complicated. If you have a compelling need to implement your particular Sometimes policy, Spotless supports that with spotlessCheck.dependsOn.remove('check') EDIT NedTwigg June 30 2020

spotless {
    enforceCheck = false
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

gradle ignoreFailures test property - java - Stack Overflow
When executed gradle clean build , the unit test failures do not mark the build as failed. I know the default behaviour is...
Read more >
How to set the ignoreFailures property in gradle files written in ...
I am trying to set the ignoreFailures property in a build.gradle.kts file in ... I found some samples indicating the property for Test...
Read more >
Property IgnoreFailures | Addressables | 1.18.19
IgnoreFailures. Controls whether errors are logged - this is disabled when trying to load from the local cache since failures are expected ...
Read more >
Gradle - How to continue build if test is failed - Mkyong.com
Try ignoreFailures settings. build.gradle. test { ignoreFailures = true } ... Apply the java-library plugin to add support for Java Library
Read more >
Gradle | PMD Source Code Analyzer
In your build.gradle add the following: plugins { id 'pmd' } ... If you want to fail the build for pmd violations, you...
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