Skip to content

Better names for indentWithSpaces and indentWithTabs #794

@wheelerlaw

Description

@wheelerlaw

So I have this simple groovy formatter just to ensure that all files Groovy and Groovy related files end with newlines and are indented using 4 spaces. However, when I run ./gradlew spotlessApply, files that are indented with 2 spaces are not converted. Here is the block:

spotless {
    format 'groovy', {
        target '*.gradle', 'Jenkinsfile*', '*.groovy'
        indentWithSpaces()
        endWithNewline()
    }
}

I am not using the groovy formatter because I have Jenkins script files that are located outside of source sets. So according to the documentation, this should work, since I have defined the target file name matcher, and the rules I want applied.

Spotless version: 5.10.0
Gradle version: 6.7
Operating system: Fedora 33

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions