Skip to content

Commit

Permalink
Update changes.md and README files
Browse files Browse the repository at this point in the history
  • Loading branch information
zashroof committed Jan 22, 2025
1 parent 7d1fe1f commit a498d33
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This document is intended for Spotless developers.
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

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

## [3.0.2] - 2025-01-14
### Fixed
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

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

## [2.44.2] - 2025-01-14
* Eclipse-based tasks can now handle parallel configuration ([#2389](https://github.com/diffplug/spotless/issues/2389))
Expand Down
30 changes: 21 additions & 9 deletions plugin-maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ user@machine repo % mvn spotless:check
- [Groovy](#groovy) ([eclipse groovy](#eclipse-groovy))
- [Kotlin](#kotlin) ([ktfmt](#ktfmt), [ktlint](#ktlint), [diktat](#diktat), [prettier](#prettier))
- [Scala](#scala) ([scalafmt](#scalafmt))
- [C/C++](#cc) ([eclipse cdt](#eclipse-cdt))
- [C/C++](#cc) ([eclipse cdt](#eclipse-cdt), [clang-format](#clang-format))
- [Python](#python) ([black](#black))
- [Antlr4](#antlr4) ([antlr4formatter](#antlr4formatter))
- [Sql](#sql) ([dbeaver](#dbeaver))
Expand All @@ -56,7 +56,7 @@ user@machine repo % mvn spotless:check
- [Gherkin](#gherkin)
- [Go](#go)
- [RDF](#RDF)
- [Protobuf](#protobuf) ([buf](#buf))
- [Protobuf](#protobuf) ([buf](#buf), [clang-format](#clang))
- Multiple languages
- [Prettier](#prettier) ([plugins](#prettier-plugins), [npm detection](#npm-detection), [`.npmrc` detection](#npmrc-detection), [caching `npm install` results](#caching-results-of-npm-install))
- [eclipse web tools platform](#eclipse-web-tools-platform)
Expand Down Expand Up @@ -558,6 +558,18 @@ Additionally, `editorConfigOverride` options will override what's supplied in `.
</eclipseCdt>
```

### clang-format

[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.

```xml
<clangFormat>
<version>14.0.0-1ubuntu1.1</version> <!-- optional version of clang-format -->
<pathToExe>/path/to/buf</pathToExe> <!-- optional: if clang-format isn't in your path -->
<style>LLVM</style> <!-- optional: can be LLVM, Google, Chromium, Mozilla, WebKit -->
</clangFormat>
```

## Python

[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).
Expand Down Expand Up @@ -1218,17 +1230,17 @@ RDF parsing is done via [Apache Jena](https://jena.apache.org/) in the version t
[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).
```xml
<configuration>
<includes> <!-- optiona: default is **/*.proto -->
<include>proto/*.proto<include>
<includes>
<includes> <!-- optional: default is **/*.proto -->
<include>proto/*.proto</include>
</includes>

<excludes> <!-- optiona: if you want to ignore auto generated protos -->
<include>target/**/<include>
<excludes>
<excludes> <!-- optional: if you want to ignore auto generated protos -->
<exclude>target/**/<exclude>
</excludes>

<protobuf>
<buf /> <!-- has its own section below -->
</css>
</protobuf>
</configuration>
```

Expand Down

0 comments on commit a498d33

Please sign in to comment.