{"id":17229322,"url":"https://github.com/fpoli/cargo-diff-tools","last_synced_at":"2025-07-25T12:35:04.563Z","repository":{"id":57534098,"uuid":"363850041","full_name":"fpoli/cargo-diff-tools","owner":"fpoli","description":"Hide cargo/clippy warnings that are not in a `git diff`","archived":false,"fork":false,"pushed_at":"2021-05-05T16:13:56.000Z","size":21,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T12:07:27.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-03T07:27:51.000Z","updated_at":"2024-06-28T15:52:27.000Z","dependencies_parsed_at":"2022-09-26T18:21:25.383Z","dependency_job_id":null,"html_url":"https://github.com/fpoli/cargo-diff-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fpoli/cargo-diff-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fcargo-diff-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fcargo-diff-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fcargo-diff-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fcargo-diff-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpoli","download_url":"https://codeload.github.com/fpoli/cargo-diff-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fcargo-diff-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T04:47:27.630Z","updated_at":"2025-07-25T12:35:04.537Z","avatar_url":"https://github.com/fpoli.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cargo diff-tools\n\nRun `cargo check` and `cargo clippy` hiding the warning messages whose primary line is not included in a `git diff`. Useful in large projects to hide warning messages that are probably not related to the changes made by a pull request.\n\nInspired by [`Patryk27/clippy-dirty`](https://github.com/Patryk27/clippy-dirty).\n\n## Install\n\n```bash\ncargo install cargo-diff-tools\n```\n\n## Examples\n\nRun `cargo clippy` hiding the warning messages whose primary line is not included in a `git origin/master HEAD`:\n\n```bash\ncargo-clippy-diff origin/master HEAD\n```\n\nThe same, for `cargo check`:\n\n```bash\ncargo-check-diff origin/master HEAD\n```\n\nVarious `git diff` arguments are supported:\n\n```bash\ncargo-clippy-diff HEAD      # internally calls `git diff HEAD`\ncargo-clippy-diff --staged  # internally calls `git diff --staged`\ncargo-clippy-diff first-branch...second-branch origin/master  # and so on\n```\n\nPlace `cargo check` arguments after a `--`:\n\n```bash\ncargo-check-diff HEAD -- --all-features\n```\n\nPlace `cargo clippy` arguments after a `--` (note that the second `--` is one of `clippy`'s arguments):\n\n```bash\ncargo-clippy-diff HEAD -- --all-features -- -D clippy::lint_name\n```\n\nTo display diagnostics as JSON objects, use `--output=json`:\n\n```bash\ncargo-clippy-diff --output=json origin/master HEAD\n```\n\nTo display diagnostics as [workflow commands in GitHub Actions](https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message) (useful to automatically add comments to pull requests), use `--output=github`:\n\n```bash\ncargo-clippy-diff --output=github $(git merge-base $PR_BASE_SHA $PR_HEAD_SHA) $PR_HEAD_SHA\n# Example output \"::warning file=lib.rs,line=4,col=2::Missing semicolon\"\n```\n\nFor other `cargo` commands, `filter-by-diff` can be used to filter any stream of JSON diagnostics:\n\n```bash\ncargo build --message-format=json-diagnostic-rendered-ansi \\\n    | filter-by-diff --output=rendered origin/master HEAD\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpoli%2Fcargo-diff-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpoli%2Fcargo-diff-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpoli%2Fcargo-diff-tools/lists"}