Questions tagged [spotless]
Use this tag for errors or bugs related to usage of this plugin, usually combined with the specific tags of language or technology.
spotless
42
questions
0
votes
0
answers
23
views
Format WSDL files using Spotless with Maven
I am trying to use Spotless with Maven to format WSDL files.
Here is my configuration in the pom.xml:
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>...
0
votes
0
answers
76
views
Why does Spotless not break long lines though configured to do so?
We have a Java file with content like this (the "real" code does not matter):
public class Example {
public void doSomething(List<String> list) {
try {
if (...
0
votes
0
answers
55
views
How do i disable custom rule in spoltless using ktlint
Rule i want to suppress compose:vm-forwarding-check
i tried adding @Suppress("ktlint:compose:vm-forwarding-check")
but that doesn't work
0
votes
0
answers
516
views
How to configure gradle spotless pugin to replace .* imports and sort fields and methods in Intellij
I am using Java 17 with IntelliJ 2023.2.2 and attempting to configure the Gradle Spotless plugin to replace
import java.util.*
with individual class imports, such as
import java.util.List;
import ...
1
vote
0
answers
246
views
How to make spotless format your code as per custom config file which is followed by checkstyle in Gradle
My checkstyle is following custom config file define in root folder of application(config.xml file).
I am trying to identify how to configure spotless in gradle such that spotless shall aut format ...
1
vote
1
answer
773
views
How to disable a Gradle task? (Spotless, OpenTelemetry)
Problem : Project linting task (Spotless-check) is too nitpicky and will not allow project to build
Goal : Trying disable the the spotless task when invoking ./gradelw assemble
(https://github.com/...
0
votes
1
answer
602
views
What spotless must depend on?
I added diffplug/spotless plugin to my project placing it as a dependency of a build task.
tasks.build.dependsOn(tasks.integrationTest, tasks.spotlessJava
I get the following error:
* What went wrong:...
5
votes
1
answer
1k
views
Ignoring Compose function naming error in Spotless(ktlint)
I just added Spotless to my project with this config:
build.gradle.kts(:app)
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com....
0
votes
0
answers
808
views
How to disable "rule: standard:no-wildcard-imports" with spotless version 6.19.0?
I'm new to Spotless and ktlint, trying to add it to my projects. Basic configuration is simple enough, however I want to allow wildcard imports, a topic which comes up quite regularly. However, I can'...
1
vote
2
answers
2k
views
Spotless + Eclipse Formatter + Java 17 = Error on String Literals + Removing Unused Imports
I am upgrading my Spring Boot app to use Spring 3+ and Java 17. However, I'm now getting an error when trying to apply spotless and to do with removeUnusedImports feature.
This issue is similar to ...
0
votes
1
answer
485
views
Adding kotlin-bom to gradle dependency breaks the application
I am trying to update the build.gradle.kts by moving kotlin-bom from dependencyManagement to dependencies.
Am using java 17 and gradle 8.2
earlier it was
dependencyManagement {
imports {
mavenBom(&...
0
votes
1
answer
4k
views
How to disable ktlint max-line-length standard rule
I'm using ktlint 0.50.0, with Spotless 6.20.0, on AGP 8.1.0. Running spotless as a PreCommit Git hook.
Due to the existence of too many old code, I'm trying to disable some rules.
The one that gives ...
4
votes
0
answers
657
views
How to configure spotless to keep line breaks for java builders
I am using spotless to format my java code and I am fairly happy with it.
However it keeps reformatting my builders so that everything is on one line when it is within the line limits.
For example ...
1
vote
0
answers
434
views
Java spotless plugin with starred imports
I have a swagger openapi yml definition to generate apis. But this plugin incorporates unused imprts into the generated files. I could erase most of them by spotless plugin but I can't stop swagger to ...
0
votes
1
answer
675
views
Eclipse Code Formatter Profile within IntelliJ: Javadoc formatting
as all the other collegues are working with eclipse for an project I have imported the Eclipse Formatter profile xml file and imported it within IntelliJ so far everything seems to be ok, but there is ...