{"id":13822641,"url":"https://github.com/Emoun/duplicate","last_synced_at":"2025-05-16T17:31:24.622Z","repository":{"id":40634936,"uuid":"250337391","full_name":"Emoun/duplicate","owner":"Emoun","description":"Easy code duplicate with substitution for Rust","archived":false,"fork":false,"pushed_at":"2024-04-17T10:04:42.000Z","size":271,"stargazers_count":220,"open_issues_count":6,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-18T00:31:04.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Emoun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-03-26T18:18:15.000Z","updated_at":"2024-04-23T12:12:33.010Z","dependencies_parsed_at":"2024-01-18T04:07:11.586Z","dependency_job_id":"b38c7795-3d96-4be8-a681-0aa35a4a7577","html_url":"https://github.com/Emoun/duplicate","commit_stats":{"total_commits":124,"total_committers":6,"mean_commits":"20.666666666666668","dds":"0.18548387096774188","last_synced_commit":"2f9745716c47afd62c429ac80272606ee76e72d6"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emoun%2Fduplicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emoun%2Fduplicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emoun%2Fduplicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emoun%2Fduplicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emoun","download_url":"https://codeload.github.com/Emoun/duplicate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225442861,"owners_count":17475124,"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","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-08-04T08:02:10.542Z","updated_at":"2024-11-19T23:30:47.625Z","avatar_url":"https://github.com/Emoun.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"duplicate\n=============================\n\n[![Rust](https://github.com/Emoun/duplicate/actions/workflows/rust.yml/badge.svg)](https://github.com/Emoun/duplicate/actions)\n[![Latest Version](https://img.shields.io/crates/v/duplicate.svg)](https://crates.io/crates/duplicate)\n[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/duplicate)\n\nmacros for code duplication with substitution.\n\nThis document is meant for contributors to the crate. The documentation is hosted at [docs.rs](https://docs.rs/duplicate).\n\n# Testing\n\n#### Setup\n\nThis crate uses [macrotest](https://crates.io/crates/macrotest) for testing expansions. \nTherefore, before running these tests the nightly compiler must be installed together with `rustfmt` and `cargo-expand`:\n\n```\ncargo install --locked cargo-expand\nrustup toolchain install nightly\nrustup component add rustfmt\n```\n\nThe tests can then be run normally using `cargo test` as seen below.\n\n#### Test Groups\n\nTests are divided into the following groups:\n\n- `No Features`:\nTests the minimal API of the crate with no features enabled. \n\n```\ncargo test --no-default-features\n```\n\n- `Default Features`: \nTest that the features that are enabled by default.\n\n```\ncargo test\n```\n\n- `All Feature Combinations`:\nTests any combination of features. After `--features` add a comma separated list of features to test:\n\n```\ncargo test --no-default-features --features module_disambiguation,pretty_errors\n```\n\n- `documentation`:\nTests code in the documentation. Even though some of the other test groups might test some of the documentaion code, they are not guaranteed to run all tests. E.g. the test of the cargo readme file (`cargo-readme.md` are only run when this command is used.\n```\ncargo test --doc --all-features\n```\n\n#### Warnings\n\nCompilation warnings are prohibited in this crate and cause CI failure.\nHowever, this prohibition of off by default in the code to allow for warnings while work is still in progress.\n\nTo make compilation fail on warnings, simply add `--features=fail-on-warnings` to your build/test command. E.g.:\n\n```\ncargo test --features=fail-on-warnings\n```\n\n# Formatting\n\nWe use `rustfmt` to manage the formatting of this crate's code.\nTo have cargo format the code for you, you must have the nightly compiler installed (but not necessarily the default) and then run the command:\n\n```\ncargo +nightly fmt\n```\n\nThe CI/CD will check the formatting and fail if it isn't formatted correctly.\n\n# Release Deployment\n\nDeployment of new versions of this crate is managed by CI/CD using git tags. \nTo trigger a new release, simply push a tag to the repository containing only the version number:\n\n```\ngit tag 1.0.0\ngit push --tags\n```\n\nWe do not use the `Cargo.toml` to manage the versioning of this crate.\nThe version given in it should not be changed! \nIt must remain as `0.0.0` so CI/CD can correctly modify it for every release.\n\nCI/CD will also reset the change log as part of the release, so do not change the `## [Unreleased]` line nor add an entry for new releases yourself.\n\nCI/CD will also add the new release's changes to `cargo-readme.md` under the `Changelog` section. So do not touch that either.\n\n#### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in this crate by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\u003c/sub\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmoun%2Fduplicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmoun%2Fduplicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmoun%2Fduplicate/lists"}