{"id":13994401,"url":"https://github.com/fastlane-community/xcov","last_synced_at":"2025-07-22T19:32:15.405Z","repository":{"id":41337411,"uuid":"50302587","full_name":"fastlane-community/xcov","owner":"fastlane-community","description":"Nice code coverage reporting without hassle","archived":false,"fork":false,"pushed_at":"2024-02-13T18:37:26.000Z","size":2974,"stargazers_count":556,"open_issues_count":55,"forks_count":105,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-08-10T14:16:04.518Z","etag":null,"topics":["ci","command-line-tool","continuous-integration","coverage","coverage-report","fastlane","html-report","xccoverage","xcode"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/fastlane-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"nakiostudio"}},"created_at":"2016-01-24T18:58:20.000Z","updated_at":"2024-08-06T20:53:38.000Z","dependencies_parsed_at":"2024-01-18T04:56:15.296Z","dependency_job_id":"5e6fda12-b2ab-4d0a-90f0-d9136d884fb6","html_url":"https://github.com/fastlane-community/xcov","commit_stats":{"total_commits":250,"total_committers":37,"mean_commits":6.756756756756757,"dds":0.376,"last_synced_commit":"2dcd3beb074a3771f3f10e30cc32c07f00722869"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastlane-community%2Fxcov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastlane-community%2Fxcov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastlane-community%2Fxcov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastlane-community%2Fxcov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastlane-community","download_url":"https://codeload.github.com/fastlane-community/xcov/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227166700,"owners_count":17740964,"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":["ci","command-line-tool","continuous-integration","coverage","coverage-report","fastlane","html-report","xccoverage","xcode"],"created_at":"2024-08-09T14:02:51.295Z","updated_at":"2024-11-29T16:31:21.384Z","avatar_url":"https://github.com/fastlane-community.png","language":"Ruby","funding_links":["https://ko-fi.com/nakiostudio"],"categories":["Ruby"],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/logo.png\" alt=\"xcov Logo\" /\u003e\n\u003c/h3\u003e\n\n-------\n\n[![Twitter: @nakiostudio](https://img.shields.io/badge/contact-@nakiostudio-blue.svg?style=flat)](https://twitter.com/nakiostudio)\n[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/nakiostudio/xcov/blob/master/LICENSE)\n[![Gem](https://img.shields.io/gem/v/xcov.svg?style=flat)](http://rubygems.org/gems/xcov)\n[![Gem Downloads](https://img.shields.io/gem/dt/xcov.svg?style=flat)](http://rubygems.org/gems/xcov)\n\n**xcov** is a friendly visualizer for Xcode's code coverage files.\n\n\u003e Maintainers needed\n\n## Installation\n```\nsudo gem install xcov\n```\n\n## Features\n* Built on top of [fastlane](https://fastlane.tools), you can easily plug it on to your CI environment.\n* Blacklisting of those files which coverage you want to ignore.\n* Minimum acceptable coverage percentage.\n* Compatible with [Coveralls](https://coveralls.io).\n* Nice HTML, JSON and Markdown reports.\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/report.png\" /\u003e\n\u003c/h3\u003e\n\n* Slack integration.\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/slack_integration.png\" /\u003e\n\u003c/h3\u003e\n\n## Requirements\nIn order to make *xcov* run you must:\n* Use Xcode 7 or above.\n* Have the latest version of Xcode command line tools.\n* Set your project scheme as **shared**.\n* Enable the **Gather coverage data** setting available on your scheme settings window.\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/gather_coverage.png\" /\u003e\n\u003c/h3\u003e\n\n## Usage\n*xcov* analyzes the `.xccoverage` and `.xccovreport` files created after running your tests therefore, before executing xcov, you need to run your tests with either `Xcode`, `xcodebuild` or [scan](https://github.com/fastlane/fastlane/tree/master/scan). Once completed, obtain your coverage report by providing a few parameters:\n```\nxcov -w LystSDK.xcworkspace -s LystSDK -o xcov_output\n```\n\n### Parameters allowed\n* `--workspace` `-w`: Path of your `xcworkspace` file.\n* `--project` `-p`: Path of your `xcodeproj` file (optional).\n* `--scheme` `-s`: Scheme of the project to analyze.\n* `--configuration` `-q`: The configuration used when building the app. Defaults to 'Release' (optional).\n* `--output_directory` `-o`: Path for the output folder where the report files will be saved.\n* `--source_directory` `-r`: The path to project's root directory (optional).\n* `--derived_data_path` `-j`: Path of your project `Derived Data` folder (optional).\n* `--xccov_file_direct_path` `-f`: Direct path to the xccoverage/xccovreport file to parse to generate code coverage (optional).\n* `--cloned_source_packages_path` `-C`: Sets a custom path for Swift Package Manager dependencies (optional).\n* `--minimum_coverage_percentage` `-m`: Raise exception if overall coverage percentage is under this value (ie. 75.0).\n* `--include_test_targets`: Enables coverage reports for `.xctest` targets.\n* `--ignore_file_path` `-x`: Relative or absolute path to the file containing the list of ignored files.\n* `--exclude_targets`: Comma separated list of targets to exclude from coverage report.\n* `--include_targets`: Comma separated list of targets to include in coverage report.\n* `--slack_url` `-i`: Incoming WebHook for your Slack group to post results (optional).\n* `--slack_channel` `-e`: Slack channel where the results will be posted (optional).\n* `--html_report`: Enables the creation of a html report. Enabled by default (optional).\n* `--json_report`: Enables the creation of a json report (optional).\n* `--markdown_report`: Enables the creation of a markdown report (optional).\n* `--skip_slack`: Add this flag to avoid publishing results on Slack (optional).\n* `--only_project_targets`: Display the coverage only for main project targets (e.g. skip Pods targets).\n* `--disable_coveralls`: Add this flag to disable automatic submission to Coveralls.\n* `--coveralls_service_name`: Name of the CI service compatible with Coveralls. i.e. travis-ci. This option must be defined along with coveralls_service_job_id (optional).\n* `--coveralls_service_job_id`: Name of the current job running on a CI service compatible with Coveralls. This option must be defined along with coveralls_service_name (optional).\n* `--coveralls_repo_token`: Repository token to be used by integrations not compatible with Coveralls (optional).\n* `--slack_username`: The username which is used to publish to slack (optional).\n* `--slack_message`: The message which is published together with a successful report (optional).\n* `--xcconfig`: Use an extra XCCONFIG file to build your app (optional).\n* `--ideFoundationPath`: Absolute path to the IDEFoundation.framework binary (optional).\n* `--legacy_support`: Enables parsing coverage reports generated by Xcode 9.2 or previous versions.\n* `--is_swift_package`: Enables generating coverage reports for Package.swift derived projects.\n\n_**Note:** All paths you provide should be absolute and unescaped_\n\n### Ignoring files\nYou can easily ignore the coverage for a specified set of files by adding their filenames to the *ignore file* specified with the `--ignore_file_path` parameter (this file is `.xcovignore` by default). You can also specify a wildcard expression for matching a group of files.\n\nIf you want to ignore all the files from a directory (folder), specify directory's relative path in *ignore file*. Also, specify `source_directory` if that differs from working directory (which is the default value).\n\nEach one of the filenames you would like to ignore must be prefixed by the dash symbol `-`. In addition you can comment lines by prefixing them by `#`. Example:\n\n```yaml\n# Api files\n- LSTSessionApi.swift\n- LSTComponentsApi.swift\n- LSTNotificationsApi.swift\n\n# Managers\n- LSTRequestManager.m\n- LSTCookiesManager.m\n\n# Utils\n- LSTStateMachine.swift\n\n# Exclude all files ending by \"View.swift\"\n- .*View.swift\n\n# Exclude all dependencies\n- Pods\n- Carthage/Checkouts\n```\n\n**Note:** Ignores are handled case-insensitively. `Pods` will match any of `pods`, `PODS`, or `Pods`.\n\n## [Fastlane](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md)\n\n*Fastlane 1.61.0* includes *xcov* as a custom action. You can easily create your coverage reports as follows:\n```ruby\nxcov(\n  workspace: \"YourWorkspace.xcworkspace\",\n  scheme: \"YourScheme\",\n  output_directory: \"xcov_output\"\n)  \n```\n\n## [Danger](https://danger.systems)\n\nWith the *Danger* plugin you can receive your coverage reports directly on your pull requests. You can find more information on the plugin repository available [here](https://github.com/nakiostudio/danger-xcov).\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/xcov_danger.png\" /\u003e\n\u003c/h3\u003e\n\n## [Coveralls](https://coveralls.io)\n\nIf you want to keep track of the coverage evolution and get some extra features, *xcov* allows you to submit coverage reports to *Coveralls*. To do so, simply create an account and run *xcov* setting the options `coveralls_service_name` and `coveralls_service_job_id` for compatible CI environments. However, if you want to post to *Coveralls* from the console or any custom environment simply set the `coveralls_repo_token` option.\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"/assets_readme/coveralls_integration.png\" /\u003e\n\u003c/h3\u003e\n\n## Contributors\n\n[![nakiostudio](https://avatars2.githubusercontent.com/u/1814571?v=3\u0026s=50)](https://github.com/nakiostudio)\n[![opfeffer](https://avatars3.githubusercontent.com/u/1138127?v=3\u0026s=50)](https://github.com/opfeffer)\n[![stevenreinisch](https://avatars0.githubusercontent.com/u/675216?v=3\u0026s=50)](https://github.com/stevenreinisch)\n[![hds](https://avatars0.githubusercontent.com/u/89589?v=3\u0026s=50)](https://github.com/hds)\n[![michaelharro](https://avatars3.githubusercontent.com/u/318260?v=3\u0026s=50)](https://github.com/michaelharro)\n[![thelvis4](https://avatars1.githubusercontent.com/u/1589385?v=3\u0026s=50)](https://github.com/thelvis4)\n[![KrauseFx](https://avatars1.githubusercontent.com/u/869950?v=3\u0026s=50)](https://github.com/KrauseFx)\n[![BennX](https://avatars1.githubusercontent.com/u/4281635?v=3\u0026s=50)](https://github.com/BennX)\n[![initFabian](https://avatars1.githubusercontent.com/u/8469495?v=3\u0026s=50)](https://github.com/initFabian)\n[![revolter](https://avatars1.githubusercontent.com/u/5748627?v=3\u0026s=50)](https://github.com/revolter)\n[![chrisballinger](https://avatars1.githubusercontent.com/u/518687?v=3\u0026s=50)](https://github.com/chrisballinger)\n[![ngs](https://avatars1.githubusercontent.com/u/18631?v=3\u0026s=50)](https://github.com/ngs)\n[![aaroncrespo](https://avatars1.githubusercontent.com/u/431662?v=3\u0026s=50)](https://github.com/aaroncrespo)\n[![cmarchal](https://avatars2.githubusercontent.com/u/4172707?v=3\u0026s=50)](https://github.com/cmarchal)\n\n\n## License\nThis project is licensed under the terms of the MIT license. See the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastlane-community%2Fxcov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastlane-community%2Fxcov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastlane-community%2Fxcov/lists"}