#fmt #action #cargo #github-action #cargo-check #cargo-doc

app cargo-action-fmt

Converts cargo check (and clippy) JSON output to the GitHub Action error format

9 releases (5 stable)

1.0.4 Dec 4, 2022
1.0.2 Jul 18, 2022
1.0.1 May 17, 2022
0.1.3 Feb 14, 2022

#102 in Cargo plugins

Download history 9/week @ 2023-08-12 21/week @ 2023-08-26 20/week @ 2023-09-02 3/week @ 2023-09-09 1/week @ 2023-09-16 2/week @ 2023-09-23 2/week @ 2023-09-30 16/week @ 2023-10-28 1/week @ 2023-11-04 1/week @ 2023-11-11 2/week @ 2023-11-18 58/week @ 2023-11-25

63 downloads per month

MIT license

8KB
84 lines

cargo-action-fmt

Takes JSON-formatted cargo check (and cargo clippy) output and formats it for GitHub actions.

Examples

This tool can be used with a variety of cargo commands:

:; cargo check -q --message-format=json | cargo-action-fmt
:; cargo clippy -q --message-format=json | cargo-action-fmt
:; cargo doc --message-format=json | cargo-action-fmt

Note that this tool does not currently support cargo fmt or cargo test output. However, you can invoke cargo test so that test compilation errors are annotated properly:

:; cargo test --no-run --message-format=json | cargo-action-fmt

GitHub Action

It's primarily intended to be used in a GitHub Actions workflow:

  docs:
    runs-on: ubuntu-latest
    container: rust:slim
    steps:
      - uses: olix0r/cargo-action-fmt/setup@v2
      - uses: actions/checkout@v2
      - run: cargo doc --no-deps --message-format=json | cargo-action-fmt

Example annotation

Dependencies

~1.8–2.6MB
~52K SLoC