#fmt #cargo #json #error #clippy #cargo-commands #github #github-actions #format #action

app cargo-action-fmt

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

7 releases (3 stable)

Uses new Rust 2021

1.0.2 Jul 18, 2022
1.0.1 May 17, 2022
0.1.3 Feb 14, 2022

#458 in Development tools

23 downloads per month

MIT license

9KB
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 | clippy-action-fmt
:; cargo clippy -q --message-format=json | clippy-action-fmt
:; cargo doc --message-format=json | clippy-action-fmt

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

  docs:
    timeout-minutes: 10
    runs-on: ubuntu-latest
    container:
      image: docker://rust:1.60-bullseye
    steps:
      - uses: olix0r/cargo-action-fmt@v1.0.1
      - uses: actions/checkout@v2
      - run: cargo doc --no-deps --message-format=json | cargo-action-fmt

Example annotation

Dependencies

~2.3–3.5MB
~63K SLoC