Skip to content

Commit 867bea5

Browse files
Reformat everything with dprint (#563)
This reformats the repository with the same / action as in `smawk`. --------- Co-authored-by: Martin Geisler <martin@geisler.net>
1 parent 3d05e58 commit 867bea5

File tree

20 files changed

+652
-586
lines changed

20 files changed

+652
-586
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- master
88
schedule:
9-
- cron: '30 17 * * 5' # Every Friday at 17:30 UTC
9+
- cron: "30 17 * * 5" # Every Friday at 17:30 UTC
1010

1111
env:
1212
CARGO_TERM_COLOR: always
@@ -15,7 +15,6 @@ env:
1515
RUSTFLAGS: -D warnings
1616

1717
jobs:
18-
1918
# Here we check that we can run `cargo test` on modern versions of
2019
# Rust. Below we check that we can build the library on an old
2120
# version as well.
@@ -270,3 +269,21 @@ jobs:
270269
- name: Deploy textwrap-wasm-demo-app
271270
if: steps.git-add.outputs.has-changes == 'true'
272271
run: git push origin
272+
273+
format:
274+
name: Format
275+
runs-on: ubuntu-latest
276+
steps:
277+
- name: Checkout repository
278+
uses: actions/checkout@v4
279+
280+
# We use an unstable rustfmt feature and we thus need the
281+
# nightly channel to enforce the formatting.
282+
- name: Setup Rust nightly
283+
run: rustup default nightly
284+
285+
- name: Install rustfmt
286+
run: rustup component add rustfmt
287+
288+
- name: Check Formatting
289+
uses: dprint/check@v2.2

.github/workflows/cifuzz.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ jobs:
44
Fuzzing:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Build Fuzzers
8-
id: build
9-
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
10-
with:
11-
oss-fuzz-project-name: 'textwrap'
12-
language: rust
13-
- name: Run Fuzzers
14-
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
15-
with:
16-
oss-fuzz-project-name: 'textwrap'
17-
fuzz-seconds: 300
18-
language: rust
19-
- name: Upload Crash
20-
uses: actions/upload-artifact@v4
21-
if: failure() && steps.build.outcome == 'success'
22-
with:
23-
name: artifacts
24-
path: ./out/artifacts
7+
- name: Build Fuzzers
8+
id: build
9+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
10+
with:
11+
oss-fuzz-project-name: "textwrap"
12+
language: rust
13+
- name: Run Fuzzers
14+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
15+
with:
16+
oss-fuzz-project-name: "textwrap"
17+
fuzz-seconds: 300
18+
language: rust
19+
- name: Upload Crash
20+
uses: actions/upload-artifact@v4
21+
if: failure() && steps.build.outcome == 'success'
22+
with:
23+
name: artifacts
24+
path: ./out/artifacts

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Prepare Release PR
33
on:
44
push:
55
branches:
6-
- 'release-*'
6+
- "release-*"
77

88
jobs:
99
setup:
@@ -167,7 +167,7 @@ jobs:
167167

168168
- name: Build and test
169169
run: |
170-
cargo test
170+
cargo test
171171
172172
- name: Commit version bump
173173
run: |

0 commit comments

Comments
 (0)