diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b6d77da..2ee3bf2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -63,6 +63,27 @@ jobs: if: matrix.os == 'macos-latest' run: sudo bash integration-tests/macos.sh + format: + name: Format + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + default: true + components: rustfmt + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + clippy: name: Clippy runs-on: ubuntu-latest diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..e70b64a --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +chain_width=40