-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,4 +117,4 @@ DerivedData/ | |
!*.xcworkspace/contents.xcworkspacedata | ||
/*.gcno | ||
|
||
|
||
.scannerwork |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
function convert_file { | ||
local xccovarchive_file="$1" | ||
local file_name="$2" | ||
echo " <file path=\"$file_name\">" | ||
xcrun xccov view --file "$file_name" "$xccovarchive_file" | \ | ||
sed -n ' | ||
s/^ *\([0-9][0-9]*\): 0.*$/ <lineToCover lineNumber="\1" covered="false"\/>/p; | ||
s/^ *\([0-9][0-9]*\): [1-9].*$/ <lineToCover lineNumber="\1" covered="true"\/>/p | ||
' | ||
echo ' </file>' | ||
} | ||
|
||
function xccov_to_generic { | ||
echo '<coverage version="1">' | ||
for xccovarchive_file in "$@"; do | ||
xcrun xccov view --file-list "$xccovarchive_file" | while read -r file_name; do | ||
convert_file "$xccovarchive_file" "$file_name" | ||
done | ||
done | ||
echo '</coverage>' | ||
} | ||
|
||
xccov_to_generic "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
sonar.projectKey=funzin_ViewGenerator | ||
sonar.projectName=ViewGenerator | ||
sonar.organization=funzin | ||
sonar.projectVersion=1.1.0 | ||
sonar.sources=. | ||
sonar.host.url=https://sonarcloud.io | ||
sonar.inclusions=./ViewGeneratorCore/**/.swift,./ViewGenereatorApp/**/*.swift,./ViewGenerator/**/*.swift | ||
sonar.inclusions=ViewGeneratorCore/**/*.swift,ViewGenerator/**/*.swift,ViewGeneratorApp/**/*.swift | ||
soner.language=swift |