Skip to content

Commit

Permalink
chore(ci): Check formatting
Browse files Browse the repository at this point in the history
Uses the same check / action as in `smawk`.
  • Loading branch information
waywardmonkeys committed Sep 29, 2024
1 parent 94e7f1d commit 0609c60
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,21 @@ jobs:
- name: Deploy textwrap-wasm-demo-app
if: steps.git-add.outputs.has-changes == 'true'
run: git push origin

format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# We use an unstable rustfmt feature and we thus need the
# nightly channel to enforce the formatting.
- name: Setup Rust nightly
run: rustup default nightly

- name: Install rustfmt
run: rustup component add rustfmt

- name: Check Formatting
uses: dprint/[email protected]
19 changes: 19 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"markdown": {
"textWrap": "always"
},
"exec": {
"commands": [{
"command": "rustfmt",
"exts": ["rs"]
}]
},
"excludes": ["target/"],
"plugins": [
"https://plugins.dprint.dev/json-0.17.4.wasm",
"https://plugins.dprint.dev/markdown-0.16.1.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm",
"https://plugins.dprint.dev/exec-0.4.3.json@42343548b8022c99b1d750be6b894fe6b6c7ee25f72ae9f9082226dd2e515072",
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe"
]
}

0 comments on commit 0609c60

Please sign in to comment.