{"id":16945816,"url":"https://github.com/jokeyrhyme/go-coverage-threshold","last_synced_at":"2025-04-11T15:32:34.840Z","repository":{"id":57492548,"uuid":"110376321","full_name":"jokeyrhyme/go-coverage-threshold","owner":"jokeyrhyme","description":"keep your Go test coverage above a threshold","archived":false,"fork":false,"pushed_at":"2019-10-31T21:52:00.000Z","size":19,"stargazers_count":5,"open_issues_count":3,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T15:49:50.967Z","etag":null,"topics":["golang","test-coverage"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jokeyrhyme.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-11-11T20:08:40.000Z","updated_at":"2022-06-17T17:37:06.000Z","dependencies_parsed_at":"2022-08-28T11:51:34.828Z","dependency_job_id":null,"html_url":"https://github.com/jokeyrhyme/go-coverage-threshold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jokeyrhyme%2Fgo-coverage-threshold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jokeyrhyme%2Fgo-coverage-threshold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jokeyrhyme%2Fgo-coverage-threshold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jokeyrhyme%2Fgo-coverage-threshold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jokeyrhyme","download_url":"https://codeload.github.com/jokeyrhyme/go-coverage-threshold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248431751,"owners_count":21102261,"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":["golang","test-coverage"],"created_at":"2024-10-13T21:23:55.177Z","updated_at":"2025-04-11T15:32:34.562Z","avatar_url":"https://github.com/jokeyrhyme.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-coverage-threshold [![Build Status](https://travis-ci.org/jokeyrhyme/go-coverage-threshold.svg?branch=master)](https://travis-ci.org/jokeyrhyme/go-coverage-threshold)\n\nkeep your per-path Go test coverage above a threshold\n\n## Installation\n\n```sh\ngo get -u github.com/jokeyrhyme/go-coverage-threshold/cmd/go-coverage-threshold\n```\n\n## Usage\n\n```\n$ go-coverage-threshold --help\n\nUsage of go-coverage-threshold:\n  -t float\n        threshold that coverage must exceed (shorthand) (default 80)\n  -threshold float\n        threshold that coverage must exceed (default 80)\n```\n\n`go-coverage-threshold` will internally execute `go test -cover ./...` for you\n\nIf any of your `./...` paths (paths that contain .go files) have a test coverage percentage that is below the threshold,\nthen it exits with a non-zero exit code\n\nThis is useful for Continuous Integration workflows where you want to maintain and encourage test coverage\n\n## Configuration\n\nYou may place a .cover.toml file at the root of your project,\nas an alternative to using command line arguments, e.g:\n\n```toml\n# important: specify \"50.0\" if you want 50% coverage,\n# \"50\" without the \".0\" will not work\nthreshold = 50.0\n```\n\nNote that command line arguments take precedence over configuration files\n\nNote that .cover.toml files in sub-directories take precedence over parent directories,\nso you may have a threshold for the whole project as a rule,\nyet define exceptions for certain sub-directories, e.g:\n\n* PROJECT_ROOT/.cover.toml: threshold = 80.0\n* PROJECT_ROOT/cmd/.cover.toml: threshold = 10.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjokeyrhyme%2Fgo-coverage-threshold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjokeyrhyme%2Fgo-coverage-threshold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjokeyrhyme%2Fgo-coverage-threshold/lists"}