Skip to content

Commit a498d33

Browse files
committed
Update changes.md and README files
1 parent 7d1fe1f commit a498d33

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This document is intended for Spotless developers.
1010
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
1111

1212
## [Unreleased]
13+
* Support for`clang-format` on maven-plugin ([#2406](https://github.com/diffplug/spotless/pull/2406))
1314

1415
## [3.0.2] - 2025-01-14
1516
### Fixed

plugin-maven/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
44

55
## [Unreleased]
6+
* Support for `clang-format` ([#2406](https://github.com/diffplug/spotless/pull/2406))
67

78
## [2.44.2] - 2025-01-14
89
* Eclipse-based tasks can now handle parallel configuration ([#2389](https://github.com/diffplug/spotless/issues/2389))

plugin-maven/README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ user@machine repo % mvn spotless:check
4343
- [Groovy](#groovy) ([eclipse groovy](#eclipse-groovy))
4444
- [Kotlin](#kotlin) ([ktfmt](#ktfmt), [ktlint](#ktlint), [diktat](#diktat), [prettier](#prettier))
4545
- [Scala](#scala) ([scalafmt](#scalafmt))
46-
- [C/C++](#cc) ([eclipse cdt](#eclipse-cdt))
46+
- [C/C++](#cc) ([eclipse cdt](#eclipse-cdt), [clang-format](#clang-format))
4747
- [Python](#python) ([black](#black))
4848
- [Antlr4](#antlr4) ([antlr4formatter](#antlr4formatter))
4949
- [Sql](#sql) ([dbeaver](#dbeaver))
@@ -56,7 +56,7 @@ user@machine repo % mvn spotless:check
5656
- [Gherkin](#gherkin)
5757
- [Go](#go)
5858
- [RDF](#RDF)
59-
- [Protobuf](#protobuf) ([buf](#buf))
59+
- [Protobuf](#protobuf) ([buf](#buf), [clang-format](#clang))
6060
- Multiple languages
6161
- [Prettier](#prettier) ([plugins](#prettier-plugins), [npm detection](#npm-detection), [`.npmrc` detection](#npmrc-detection), [caching `npm install` results](#caching-results-of-npm-install))
6262
- [eclipse web tools platform](#eclipse-web-tools-platform)
@@ -558,6 +558,18 @@ Additionally, `editorConfigOverride` options will override what's supplied in `.
558558
</eclipseCdt>
559559
```
560560

561+
### clang-format
562+
563+
[homepage](https://clang.llvm.org/docs/ClangFormat.html). [changelog](https://releases.llvm.org/download.html). `clang-format` is a formatter for c, c++, c#, objective-c, protobuf, javascript, and java. You can use clang-format in any language-specific format, but usually you will be creating a generic format.
564+
565+
```xml
566+
<clangFormat>
567+
<version>14.0.0-1ubuntu1.1</version> <!-- optional version of clang-format -->
568+
<pathToExe>/path/to/buf</pathToExe> <!-- optional: if clang-format isn't in your path -->
569+
<style>LLVM</style> <!-- optional: can be LLVM, Google, Chromium, Mozilla, WebKit -->
570+
</clangFormat>
571+
```
572+
561573
## Python
562574

563575
[code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/python/Python.java). [available steps](https://github.com/diffplug/spotless/tree/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/python/Black.java).
@@ -1218,17 +1230,17 @@ RDF parsing is done via [Apache Jena](https://jena.apache.org/) in the version t
12181230
[code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/protobuf/Protobuf.java). [available steps](https://github.com/diffplug/spotless/tree/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/protobuf).
12191231
```xml
12201232
<configuration>
1221-
<includes> <!-- optiona: default is **/*.proto -->
1222-
<include>proto/*.proto<include>
1223-
<includes>
1233+
<includes> <!-- optional: default is **/*.proto -->
1234+
<include>proto/*.proto</include>
1235+
</includes>
12241236

1225-
<excludes> <!-- optiona: if you want to ignore auto generated protos -->
1226-
<include>target/**/<include>
1227-
<excludes>
1237+
<excludes> <!-- optional: if you want to ignore auto generated protos -->
1238+
<exclude>target/**/<exclude>
1239+
</excludes>
12281240

12291241
<protobuf>
12301242
<buf /> <!-- has its own section below -->
1231-
</css>
1243+
</protobuf>
12321244
</configuration>
12331245
```
12341246

0 commit comments

Comments
 (0)