Skip to content

Instantly share code, notes, and snippets.

@polac24
Created February 28, 2019 18:19
Show Gist options
  • Save polac24/736ca5649efc5bc33504c4aacf9312b1 to your computer and use it in GitHub Desktop.
Save polac24/736ca5649efc5bc33504c4aacf9312b1 to your computer and use it in GitHub Desktop.
## Counting code coverage on a subset of files
# "Spies" is a regex in the example
xcrun xccov view --files-for-target StubKit.framework action.xccovreport | awk '/Spies/{print $5}' | awk '-F[/()]' '{covered += $2; all += $3} END {print covered/all*100}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment