#git-diff #clippy #git #diagnostics #cargo #cli #cargo-clippy

app diff-report-rs

仅报告与git diff行相关的cargo/clippy警告的工具

1 个不稳定版本

0.1.0 2021年4月30日

#18 in #git-diff

MIT/Apache

11KB
195

Diff-report-rs

仅报告与git diff行相关的cargo/clippy警告。用于隐藏可能与拉取请求引入的更改无关的cargoclippy警告。

灵感来自Patryk27/clippy-dirty

示例

隐藏与clippy警告中提到的行不相关的git diff $GITHUB_BASE_REF...$GITHUB_HEAD_REF $GITHUB_HEAD_REF不相关的警告(在由拉取请求触发的GitHub动作中很有用)

cargo clippy --message-format=json-diagnostic-rendered-ansi \
    | diff-report-rs $GITHUB_BASE_REF...$GITHUB_HEAD_REF $GITHUB_HEAD_REF

隐藏与git diff origin/master HEAD不相关的cargo警告

cargo check --message-format=json-diagnostic-rendered-ansi \
    | diff-report-rs origin/master HEAD

通过git diff origin/master进行筛选

... | diff-report-rs origin/master

仅通过git diff进行筛选

... | diff-report-rs

依赖

~3.5–5.5MB
~95K SLoC