Skip to content

Commit 00af4c9

Browse files
authored
Update changelog and README for 3.2.0
1 parent b3a098f commit 00af4c9

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ You might be looking for:
77

88
### Version 1.2.0-SNAPSHOT - TBD (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/snapshot/) [lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/snapshot/), [snapshot repo](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/))
99

10+
* Deprecated `FileSignature.from` in favor of `FileSignature.signAsSet` and the new `FileSignature.signAsList`.
11+
* Added a `FormatterProperties` class which loads `.properties` files and eclipse-style `.xml` files.
12+
* `SerializableFileFilter.skipFilesNamed` can now skip multiple file names.
13+
* Update default KtLint from 0.3.1 to 0.6.1.
14+
+ This means we no longer look for rules in the typo package `com.gihub.shyiko`, now only in `com.github.shyiko` (note the `t`).
15+
1016
### Version 1.1.0 - February 27th 2017 (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/1.1.0/) [lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/1.1.0/), artifact [lib]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib), [lib-extra]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib-extra)))
1117

1218
* Added support for Scala via [scalafmt](https://github.com/olafurpg/scalafmt).

plugin-gradle/CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
### Version 3.2.0-SNAPSHOT - TBD ([javadoc](https://diffplug.github.io/spotless/javadoc/snapshot/), [snapshot](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/spotless-plugin-gradle/))
44

5+
* Update default KtLint from 0.3.1 to 0.6.1 (thanks to @kvnxiao [#93](https://github.com/diffplug/spotless/pull/93)).
6+
+ This means we no longer look for rules in the typo package `com.gihub.shyiko`, now only in `com.github.shyiko` (note the `t`).
7+
* Added an `enforceCheck` property which allows users to disable adding `spotlessCheck` as a dependency of `check` (thanks to @gdecaso [#95](https://github.com/diffplug/spotless/pull/95)).
8+
* Any errors in a step will now fail the build - previously they were only warned.
9+
+ We claimed that we implemented this in 3.1.0, but it was broken. We really fixed it this time.
10+
511
### Version 3.1.0 - February 27th 2017 ([javadoc](https://diffplug.github.io/spotless/javadoc/spotless-plugin-gradle/3.1.0/), [jcenter](https://bintray.com/diffplug/opensource/spotless-plugin-gradle/3.1.0))
612

713
* Added support for Scala via [scalafmt](https://github.com/olafurpg/scalafmt).

plugin-gradle/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,34 @@ Line endings can also be set globally or per-format using the `lineEndings` prop
236236

237237
You can easily set the line endings of different files using [a `.gitattributes` file](https://help.github.com/articles/dealing-with-line-endings/). Here's an example `.gitattributes` which sets all files to unix newlines: `* text eol=lf`.
238238

239+
## Disabling warnings and error messages
240+
241+
The `check` task is Gradle's built-in task for grouping all verification tasks - unit tests, static analysis, etc. By default, `spotlessCheck` is added as a dependency to `check`.
242+
243+
You might want to disable this behavior. We [recommend against this](https://github.com/diffplug/spotless/issues/79#issuecomment-290844602), but it's easy to do if you'd like:
244+
245+
```gradle
246+
spotless {
247+
enforceCheck false
248+
}
249+
```
250+
251+
If a formatter throws an exception, possibly because of malformed code or a bug in a formatter step, Spotless will report a build failure. You can suppress these specific failures as such:
252+
253+
```gradle
254+
spotless {
255+
java {
256+
googleJavaFormat()
257+
custom 'my-glitchy-step', { }
258+
259+
ignoreErrorForStep('my-glitchy-step') // ignore errors on all files thrown by a specific step
260+
ignoreErrorForPath('path/to/file.java') // ignore errors by all steps on this specific file
261+
}
262+
}
263+
```
264+
265+
Note that `enforceCheck` is a global property which affects all formats (outside the java block), while `ignoreErrorForStep/Path` are local to a single format (inside the java block).
266+
239267
## How do I preview what `spotlessApply` will do?
240268

241269
- Save your working tree with `git add -A`, then `git commit -m "Checkpoint before spotless."`

0 commit comments

Comments
 (0)