mirror of
https://github.com/actions-rust-lang/rustfmt.git
synced 2025-12-27 01:54:20 -05:00
706f84c12d75ec5dca06e5cb6eefcb1146c14f15
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Run rustfmt
Run cargo fmt --all and report all formatting differences in a nice overview.
It works best in combination with actions-rust-lang/setup-rust-toolchain for problem matcher highlighting.
Execution Summary:
Problem Matcher:
Example workflow
name: "Test Suite"
on:
push:
pull_request:
jobs:
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
Inputs
All inputs are optional.
If a toolchain file (i.e., rust-toolchain or rust-toolchain.toml) is found in the root of the repository, it takes precedence.
All input values are ignored if a toolchain file exists.
| Name | Description | Default |
|---|---|---|
manifest-path |
Path to the Cargo.toml file, by default in the root of the repository. |
./Cargo.toml |

