Merge pull request #293 from taskchampion/cargo-fmt
add a cargo-fmt job to CI
This commit is contained in:
23
.github/workflows/checks.yml
vendored
23
.github/workflows/checks.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
name: "Clippy"
|
name: "Clippy"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
name: "Documentation"
|
name: "Documentation"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup mdBook
|
- name: Setup mdBook
|
||||||
uses: peaceiris/actions-mdbook@v1
|
uses: peaceiris/actions-mdbook@v1
|
||||||
@@ -81,3 +81,22 @@ jobs:
|
|||||||
|
|
||||||
- run: mdbook test docs
|
- run: mdbook test docs
|
||||||
- run: mdbook build docs
|
- run: mdbook build docs
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: "Formatting"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
components: rustfmt
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use anyhow::{anyhow, bail, Result};
|
use anyhow::{anyhow, bail, Result};
|
||||||
use toml::value::Table;
|
use toml::value::{Table};
|
||||||
|
|
||||||
/// Check that the input is a table and contains no keys not in the given list, returning
|
/// Check that the input is a table and contains no keys not in the given list, returning
|
||||||
/// the table.
|
/// the table.
|
||||||
|
|||||||
Reference in New Issue
Block a user