Skip to content

Commit

Permalink
Format all projects in the repository (payjoin#297)
Browse files Browse the repository at this point in the history
And state our rustfmt policy in the README.

IMO there is no solution that pleases everyone. This is what we've been
using and it hasn't caused any fires yet.

Using nightly is not the most beautiful from a toolchain perspective but
it's where we're at and it lets us not reformat the whole codebase.
  • Loading branch information
DanGould authored Jun 20, 2024
2 parents 30dd7a0 + 322eb0e commit 56b594f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,8 @@ jobs:
if: matrix.rust != '1.63.0'
run: cargo build --package payjoin-cli --verbose --features=danger-local-https,v2

fmt:
rustfmt:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package: [payjoin, payjoin-cli]

steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1.2.0
Expand All @@ -62,6 +57,4 @@ jobs:
override: true
- run: rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: fmt check
run: |
cd ${{ matrix.package }}
cargo fmt --all -- --check
run: cargo fmt --all -- --check
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ cargo update -p time@0.3.36 --precise 0.3.20
cargo update -p reqwest --precise 0.12.4
```

## Code Formatting

We use the nightly Rust formatter for this project. Please run `rustfmt` using the nightly toolchain before submitting any changes.

## License

MIT

0 comments on commit 56b594f

Please sign in to comment.