diffplug / diffplug/spotless

Spotless fails to format .gitignore

Open
#1,146 4 comments 3 reactions 0 assignees View on GitHub
bug-unconfirmed
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

Hello :wave:,

I was trying out Spotless for Gradle today and found that if failed to format my .gitignore. A minimal example would use the following `build.gradle`:

```
plugins {
id "com.diffplug.spotless" version "6.3.0"
}

spotless {
format 'misc', {
target '.gitignore'
trimTrailingWhitespace()
indentWithTabs()
endWithNewline()
}
}
```

Then introduce any formatting violation in `.gitignore` and the `spotlessCheck`, `spotlessApply`, `spotlessMiscCheck` etc. don't pick it up. Any other filename appears to work fine.

Spotless 6.3.0
Gradle 7.4.1
Java 11 and 17
Linux and macOS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.