slather 2.8.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +13 -0
- data/lib/slather/coverage_info.rb +6 -0
- data/lib/slather/coverage_service/cobertura_xml_output.rb +1 -1
- data/lib/slather/profdata_coverage_file.rb +7 -8
- data/lib/slather/project.rb +6 -1
- data/lib/slather/version.rb +1 -1
- data/spec/fixtures/cobertura.xml +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05adf16363e34b66c94cd7429e974358c3db5ec6da5e793ff5153a9502e44748
|
4
|
+
data.tar.gz: 6427c7163b3d175f79c9c4b02f192254081932787a9ac81c4b3ea5bd012112c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95ef950d4cdc027a1b2f3bc961523d5e58d86014a1595c9cee9a47cbd7ab6ff025952080aa443f0c790b4df9dc1289aa8ec053c71c42a906ced810f29da53a2
|
7
|
+
data.tar.gz: 5504fd56de51e429d949652da30fc5ac5684a6ad6edc2f4964effc90d6f824e83a6584f0e66f866bc81ab927c9c50e8c21fbdee70780d48473c1c4302818b443
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v2.8.1
|
4
|
+
|
5
|
+
* cobertura.sourceforge.net should use https instead of http
|
6
|
+
[jarrodlombardo-EventBase](https://github.com/jarrodlombardo-EventBase)
|
7
|
+
[#559](https://github.com/SlatherOrg/slather/pull/559)
|
8
|
+
|
9
|
+
* Handle include globs
|
10
|
+
[dnedrow](https://github.com/dnedrow)
|
11
|
+
[#553](https://github.com/SlatherOrg/slather/pull/553)
|
12
|
+
|
3
13
|
## v2.8.0
|
4
14
|
|
5
15
|
* Add `--ymlfile` option to override `.slather.yml`
|
data/README.md
CHANGED
@@ -88,7 +88,20 @@ Run this command to enable the `Generate Test Coverage` and `Instrument Program
|
|
88
88
|
```sh
|
89
89
|
$ slather setup path/to/project.xcodeproj
|
90
90
|
```
|
91
|
+
## General Usage Notes
|
92
|
+
### Commandline Arguments Win
|
93
|
+
When using both a config file (`.slather.yml`) and providing arguments via the commandline,
|
94
|
+
the arguments will take precedence over the matching setting in the config file.
|
91
95
|
|
96
|
+
### `ignore` always wins over `source-files`
|
97
|
+
When defining both files that should be ignored (`--ignore`, ignore) and source files to include (`--source-files`, source_files),
|
98
|
+
the ignore list is checked first. If the file being scanned matches a glob in the ignore list, it will not be included. In this case, the
|
99
|
+
source_file list is not checked.
|
100
|
+
|
101
|
+
If the file being scanned is not in the ignore list, and source_file has been defined, the source_file list is
|
102
|
+
checked. If the source file matches a glob, it will be included.
|
103
|
+
|
104
|
+
## CI Integration
|
92
105
|
### Usage with Codecov
|
93
106
|
|
94
107
|
Login to [Codecov](https://codecov.io/) (no need to activate a repository, this happens automatically). Right now, `slather` supports Codecov via **all** supported CI providers [listed here](https://github.com/codecov/codecov-bash#ci-providers).
|
@@ -246,16 +246,15 @@ module Slather
|
|
246
246
|
private :supported_file_extensions
|
247
247
|
|
248
248
|
def ignored?
|
249
|
-
|
250
|
-
# is not covered or with ccache in some cases).
|
251
|
-
ignore = source_file_pathname.to_s.end_with? "isn't covered."
|
249
|
+
path = source_file_pathname.to_s
|
252
250
|
|
253
|
-
if
|
254
|
-
|
255
|
-
|
256
|
-
|
251
|
+
# This indicates a llvm-cov coverage warning (occurs if a passed in source file
|
252
|
+
# is not covered or with cache in some cases).
|
253
|
+
return true if path.end_with?("isn't covered.")
|
254
|
+
# Ignore source files inside of platform SDKs
|
255
|
+
return true if path.include?("/Xcode.*\.app\/Contents\/Developer\/Platforms")
|
257
256
|
|
258
|
-
|
257
|
+
super
|
259
258
|
end
|
260
259
|
end
|
261
260
|
end
|
data/lib/slather/project.rb
CHANGED
@@ -185,7 +185,7 @@ module Slather
|
|
185
185
|
if paths_to_segments.key?(coverage_file.source_file_pathname)
|
186
186
|
coverage_file.segments = paths_to_segments[coverage_file.source_file_pathname]
|
187
187
|
end
|
188
|
-
!coverage_file.ignored? ? coverage_file : nil
|
188
|
+
!coverage_file.ignored? && coverage_file.include_file? ? coverage_file : nil
|
189
189
|
end.compact
|
190
190
|
end
|
191
191
|
private :create_coverage_files
|
@@ -341,6 +341,7 @@ module Slather
|
|
341
341
|
configure_arch
|
342
342
|
configure_binary_file
|
343
343
|
configure_decimals
|
344
|
+
configure_source_files
|
344
345
|
|
345
346
|
self.llvm_version = `xcrun llvm-cov --version`.match(/LLVM version ([\d\.]+)/).captures[0]
|
346
347
|
rescue => e
|
@@ -380,6 +381,10 @@ module Slather
|
|
380
381
|
self.ignore_list ||= [(self.class.yml["ignore"] || [])].flatten
|
381
382
|
end
|
382
383
|
|
384
|
+
def configure_source_files
|
385
|
+
self.source_files ||= [(self.class.yml["source_files"] || [])].flatten
|
386
|
+
end
|
387
|
+
|
383
388
|
def configure_ci_service
|
384
389
|
self.ci_service ||= (ENV["CI_SERVICE"] || self.class.yml["ci_service"] || :other)
|
385
390
|
end
|
data/lib/slather/version.rb
CHANGED
data/spec/fixtures/cobertura.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
|
-
<!DOCTYPE coverage SYSTEM "
|
2
|
+
<!DOCTYPE coverage SYSTEM "https://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
3
3
|
<coverage line-rate="0.7500000000000000" branch-rate="0.6410256410256411" lines-covered="60" lines-valid="80" branches-covered="25" branches-valid="39" complexity="0.0" timestamp="1614041230" version="Slather 2.6.1">
|
4
4
|
<sources>
|
5
5
|
<source>/Users/hborawski/sandbox/slather</source>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
- !ruby/object:Gem::Version
|
342
342
|
version: '0'
|
343
343
|
requirements: []
|
344
|
-
rubygems_version: 3.4
|
344
|
+
rubygems_version: 3.5.4
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Test coverage reports for Xcode projects
|