{"id":13998159,"url":"https://github.com/blyxyas/cargo-is-tested","last_synced_at":"2026-02-27T02:31:27.893Z","repository":{"id":65148723,"uuid":"583093957","full_name":"blyxyas/cargo-is-tested","owner":"blyxyas","description":"Assure that your tests are there, and well written.","archived":false,"fork":false,"pushed_at":"2023-01-19T15:52:49.000Z","size":1253,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T07:51:21.338Z","etag":null,"topics":["binary","cargo","cargo-subcommand","rust","rust-tools","testing","testing-tools"],"latest_commit_sha":null,"homepage":"https://blyxyas.github.io/cargo-is-tested/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blyxyas.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-28T18:42:57.000Z","updated_at":"2025-10-18T08:20:31.000Z","dependencies_parsed_at":"2023-02-11T07:55:34.386Z","dependency_job_id":null,"html_url":"https://github.com/blyxyas/cargo-is-tested","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blyxyas/cargo-is-tested","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blyxyas%2Fcargo-is-tested","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blyxyas%2Fcargo-is-tested/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blyxyas%2Fcargo-is-tested/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blyxyas%2Fcargo-is-tested/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blyxyas","download_url":"https://codeload.github.com/blyxyas/cargo-is-tested/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blyxyas%2Fcargo-is-tested/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["binary","cargo","cargo-subcommand","rust","rust-tools","testing","testing-tools"],"created_at":"2024-08-09T19:01:26.168Z","updated_at":"2026-02-27T02:31:27.876Z","avatar_url":"https://github.com/blyxyas.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ecargo-is-tested\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/blyxyas/cargo-is-tested\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/github--9cf?style=for-the-badge\u0026logo=github\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://crates.io/crates/cargo-is-tested\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/Crates.io--fc8d62?style=for-the-badge\u0026labelColor=555555\u0026logo=rust\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://docs.rs/cargo-is-tested\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/Docs.rs--66c2a5?style=for-the-badge\u0026logo=docs.rs\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://blyxyas.github.io/cargo-is-tested\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/Book--B597FC?style=for-the-badge\u0026logo=mdbook\"\u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n[🇪🇸] [El libro](https://blyxyas.github.io/cargo-is-tested) contiene instrucciones e información detallada en Español.\n\n---\n\n`cargo-is-tested` is a way to check which of your items are tested and which aren't, very configurable and with a scripting-friendly API ready to use with your Git hooks.\n\nAlso, is uses *✨ pretty colors ✨* for error reporting.\n\n**You can also [read the book](https://blyxyas.github.io/cargo-is-tested) for a more user-friendly guide.**\n\n## Example\n\nTo check if all functions are tested in the current directory.\n\n```bash\n$ cargo is-tested .\n```\n\n```toml\n# Cargo.toml\n# [...]\n\n[dependencies]\nis_tested = \"0.1.1\" # Check crates.io for the current version of the crate.\n\n# [...]\n```\n\n```rust\n// src/main.rs\n\n#! is-tested functions\n// Yes, it uses shebangs to enable testing and flags!\n\nuse is_tested::is_tested;\n\n#[is_tested(\"test/myfunction_testing_path.rs\")]\nfn my_function() {\n\t// [...]\n}\n```\n\nThen, it will check if `test/myfunction_testing_path.rs` exists, if it doesn't, it will output an error.\n\nIf the file exists, the program checks all lints against your test, assuring the best quality possible. For example, the lint `emptiness` will check that your functions aren't empty.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./assets/output-screenshot.png\" height=\"300\" width=\"auto\" /\u003e\n\u003c/div\u003e\n\n## Installation and usage\n\nTo get started using `cargo-is-tested`, install the binary.\n\n```bash\n$ cargo install cargo-is-tested\n```\n\nNow [document yourself](https://docs.rs/cargo-is-tested/latest/cargo-is-tested/lints) about all the lints you can apply to your tests. You can also use `strict` to activate them all (currently, recommendable)\n\nMore lints will be added with time.\n\n---\n\nOnce you know the lints you want to apply, import the attribute `is_tested`, then choose a struct, function or any item that you want to test, and add to that item the attribute `#[is_tested(\"\u003cpath to the test\u003e.rs\")]`\n\nThe result should be something like:\n\n```rust\n#! is-tested strict\n\nuse is_tested::is_tested;\n\n#[is_tested(\"tests/mystruct.rs\")]\nstruct MyStruct\u003c'a\u003e {\n\tstring: \u0026'a str\n}\n```\n\nDon't worry, the attribute won't change anything in your code, it's just a marker for a later-parser to know that you're testing the item.\n\n---\n\nIt's time to run the parser, it will read check that all tested items are tested, and with the correct code quality dicted using the lints.\n\n```rust\n// tests/mystruct.rs\n\nuse mycrate::MyStruct;\n\nfn main() {\n\t// [...]\n}\n```\n\n```bash\n$ cargo is-tested .\n```\n\nThis will check that all tests are well written. You can use flags to customize your experience, for example, use `--structs` to check that all structs have tests associated, or use `--test` to, if all tests are confirmed, run `cargo test` automatically.\n\n---\n\n### Stargazers\n\n[![Stargazers repo roster for @blyxyas/cargo-is-tested](https://reporoster.com/stars/blyxyas/cargo-is-tested)](https://github.com/blyxyas/cargo-is-tested/stargazers)\n\n### License\n\n`cargo-is-tested` uses the **MIT License**, 2023.\nYou can check the [LICENSE](https://github.com/blyxyas/cargo-is-tested/blob/master/LICENSE) for more information about licensing.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblyxyas%2Fcargo-is-tested","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblyxyas%2Fcargo-is-tested","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblyxyas%2Fcargo-is-tested/lists"}