Skip to content

Commit

Permalink
Merge pull request #60 from sksat/split-pipe-to-mitigate-broken-pipe
Browse files Browse the repository at this point in the history
Split clippy-reviewdog-filter pipe to mitigate broken pipe
  • Loading branch information
sksat committed Jan 15, 2024
2 parents c10e954 + 3459b29 commit a23dfaa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}"

cargo clippy --message-format human ${INPUT_CLIPPY_FLAGS}

# Rust ignore SIGPIPE by default: https://github.com/rust-lang/rust/issues/62569
# This causes `Broken pipe` error when piping to `clippy-reviewdog-filter`
cargo clippy --message-format json ${INPUT_CLIPPY_FLAGS} 2>&1 \
| clippy-reviewdog-filter \
| reviewdog \
> /tmp/clippy-checkstyle.xml

reviewdog \
-f=checkstyle \
-name="${INPUT_TOOL_NAME}" \
-level="${INPUT_LEVEL}" \
-reporter="${INPUT_REPORTER:-github-pr-check}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
${INPUT_REVIEWDOG_FLAGS}
${INPUT_REVIEWDOG_FLAGS} \
< /tmp/clippy-checkstyle.xml

0 comments on commit a23dfaa

Please sign in to comment.