Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olix0r/cargo-action-fmt
Converts cargo check (and clippy) JSON output to the GitHub Action error format
https://github.com/olix0r/cargo-action-fmt
Last synced: 20 days ago
JSON representation
Converts cargo check (and clippy) JSON output to the GitHub Action error format
- Host: GitHub
- URL: https://github.com/olix0r/cargo-action-fmt
- Owner: olix0r
- License: mit
- Created: 2022-02-13T16:39:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T03:15:47.000Z (5 months ago)
- Last Synced: 2024-10-14T18:45:02.537Z (about 1 month ago)
- Language: Rust
- Size: 112 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `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:
```shell
:; cargo check -q --message-format=json | cargo-action-fmt
``````shell
:; cargo clippy -q --message-format=json | cargo-action-fmt
``````shell
:; 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:```shell
:; cargo test --no-run --message-format=json | cargo-action-fmt
```### GitHub Action
It's primarily intended to be used in a GitHub Actions workflow:
```yaml
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](https://user-images.githubusercontent.com/240738/153767390-66f859d4-da3f-4e1e-846b-02605e8be628.png)