slather

Use slather to generate a code coverage report

Slather works with multiple code coverage formats, including Xcode 7 code coverage.
Slather is available at https://github.com/SlatherOrg/slather.

slather
Supported platforms ios, mac
Author @mattdelves

1 Example

slather(
  build_directory: "foo",
  input_format: "bah",
  scheme: "MyScheme",
  proj: "MyProject.xcodeproj"
)

Parameters

Key Description Default
build_directory The location of the build output
proj The project file that slather looks at
workspace The workspace that slather looks at
scheme Scheme to use when calling slather
configuration Configuration to use when calling slather (since slather-2.4.1)
input_format The input format that slather should look for
github Tell slather that it is running on Github Actions
buildkite Tell slather that it is running on Buildkite
teamcity Tell slather that it is running on TeamCity
jenkins Tell slather that it is running on Jenkins
travis Tell slather that it is running on TravisCI
travis_pro Tell slather that it is running on TravisCI Pro
circleci Tell slather that it is running on CircleCI
coveralls Tell slather that it should post data to Coveralls
simple_output Tell slather that it should output results to the terminal
gutter_json Tell slather that it should output results as Gutter JSON format
cobertura_xml Tell slather that it should output results as Cobertura XML format
sonarqube_xml Tell slather that it should output results as SonarQube Generic XML format
llvm_cov Tell slather that it should output results as llvm-cov show format
json Tell slather that it should output results as static JSON report
html Tell slather that it should output results as static HTML pages
show Tell slather that it should open static html pages automatically false
source_directory Tell slather the location of your source files
output_directory Tell slather the location of for your output files
ignore Tell slather to ignore files matching a path or any path from an array of paths
verbose Tell slather to enable verbose mode
use_bundle_exec Use bundle exec to execute slather. Make sure it is in the Gemfile false
binary_basename Basename of the binary file, this should match the name of your bundle excluding its extension (i.e. YourApp [for YourApp.app bundle])
binary_file Binary file name to be used for code coverage
arch Specify which architecture the binary file is in. Needed for universal binaries
source_files A Dir.glob compatible pattern used to limit the lookup to specific source files. Ignored in gcov mode false
decimals The amount of decimals to use for % coverage reporting false

* = default value is dependent on the user's system


Documentation

To show the documentation in your terminal, run

fastlane action slather

CLI

It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run slather

To pass parameters, make use of the : symbol, for example

fastlane run slather parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.


Source code

This action, just like the rest of fastlane, is fully open source, view the source code on GitHub


Back to actions