Skip to content

Commit f7a6e63

Browse files
authored
Merge branch 'main' into sortpom-parameter-end_with_newline
2 parents 9dec37a + aceab65 commit f7a6e63

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- kind: shfmt
6161
jre: 11
6262
os: ubuntu-latest
63-
shfmt-version: 3.7.0
63+
shfmt-version: v3.8.0
6464
runs-on: ${{ matrix.os }}
6565
steps:
6666
- name: Checkout
@@ -83,11 +83,15 @@ jobs:
8383
- name: test npm
8484
if: matrix.kind == 'npm'
8585
run: ./gradlew testNpm
86+
- name: Setup go
87+
if: matrix.kind == 'shfmt'
88+
uses: actions/setup-go@v5
89+
with:
90+
go-version: 'stable'
8691
- name: Install shfmt
8792
if: matrix.kind == 'shfmt'
8893
run: |
89-
curl -sSfL "https://github.com/mvdan/sh/releases/download/v${{ matrix.shfmt-version }}/shfmt_v${{ matrix.shfmt-version }}_linux_amd64" -o /usr/local/bin/shfmt
90-
chmod +x /usr/local/bin/shfmt
94+
go install mvdan.cc/sh/v3/cmd/shfmt@${{ matrix.shfmt-version }}
9195
- name: Test shfmt
9296
if: matrix.kind == 'shfmt'
9397
run: ./gradlew testShfmt

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1616
### Changes
1717
* Bump default `ktfmt` version to latest `0.46` -> `0.47`. ([#2045](https://github.com/diffplug/spotless/pull/2045))
1818
* Bump default `sortpom` version to latest `3.2.1` -> `3.4.0`. ([#2049](https://github.com/diffplug/spotless/pull/2049))
19+
* Bump default `shfmt` version to latest `3.7.0` -> `3.8.0`. ([#2050](https://github.com/diffplug/spotless/pull/2050))
1920
### Removed
2021
* **BREAKING** Remove `JarState.getMavenCoordinate(String prefix)`. ([#1945](https://github.com/diffplug/spotless/pull/1945))
2122
* **BREAKING** Replace `PipeStepPair` with `FenceStep`. ([#1954](https://github.com/diffplug/spotless/pull/1954))

lib/src/main/java/com/diffplug/spotless/shell/ShfmtStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static String name() {
4040
}
4141

4242
public static String defaultVersion() {
43-
return "3.7.0";
43+
return "3.8.0";
4444
}
4545

4646
private final String version;

plugin-gradle/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
88
### Changes
99
* Bump default `ktfmt` version to latest `0.46` -> `0.47`. ([#2045](https://github.com/diffplug/spotless/pull/2045))
1010
* Bump default `sortpom` version to latest `3.2.1` -> `3.4.0`. ([#2049](https://github.com/diffplug/spotless/pull/2049))
11+
* Bump default `shfmt` version to latest `3.7.0` -> `3.8.0`. ([#2050](https://github.com/diffplug/spotless/pull/2050))
1112
### Added
1213
* Respect `.editorconfig` settings for formatting shell via `shfmt` ([#2031](https://github.com/diffplug/spotless/pull/2031))
1314

plugin-gradle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ When formatting shell scripts via `shfmt`, configure `shfmt` settings via `.edit
10111011
Refer to the `shfmt` [man page](https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd) for `.editorconfig` settings.
10121012
10131013
```gradle
1014-
shfmt('3.7.0') // version is optional
1014+
shfmt('3.8.0') // version is optional
10151015
10161016
// if shfmt is not on your path, you must specify its location manually
10171017
shfmt().pathToExe('/opt/homebrew/bin/shfmt')

plugin-maven/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
88
### Changes
99
* Bump default `ktfmt` version to latest `0.46` -> `0.47`. ([#2045](https://github.com/diffplug/spotless/pull/2045))
1010
* Bump default `sortpom` version to latest `3.2.1` -> `3.4.0`. ([#2049](https://github.com/diffplug/spotless/pull/2049))
11+
* Bump default `shfmt` version to latest `3.7.0` -> `3.8.0`. ([#2050](https://github.com/diffplug/spotless/pull/2050))
1112
### Added
1213
* Respect `.editorconfig` settings for formatting shell via `shfmt` ([#2031](https://github.com/diffplug/spotless/pull/2031))
1314

plugin-maven/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ When formatting shell scripts via `shfmt`, configure `shfmt` settings via `.edit
10471047

10481048
```xml
10491049
<shfmt>
1050-
<version>3.7.0</version> <!-- optional: Custom version of 'mvdan/sh' -->
1050+
<version>3.8.0</version> <!-- optional: Custom version of 'mvdan/sh' -->
10511051
<pathToExe>/opt/homebrew/bin/shfmt</pathToExe> <!-- optional: if shfmt is not on your path, you must specify its location manually -->
10521052
</shfmt>
10531053
```

0 commit comments

Comments
 (0)