SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.55k stars 236 forks source link

`--source-files` not working #501

Open lfoster0 opened 3 years ago

lfoster0 commented 3 years ago

Hello I'm using Slather 2.7.1 and trying to generate coverage for a specific folder PROJECT_ROOT/Classes/Extensions/ but using --source-files to specify that folder or a specific file in the folder is not working. It generates the coverage report for the entire project each time.

Both of these examples generate coverage for the entire project even though I specify a single folder/file: slather coverage -x --workspace Project.xcworkspace --scheme iOS --build-directory ./build --source-files "./Project/Classes/Extensions/*" Project.xcodeproj

slather coverage -x --workspace Project.xcworkspace --scheme iOS --build-directory ./build --source-files "./Project/Classes/Extensions/Array+Additions.swift" Project.xcodeproj

There is also this older issue that mentions --source-files is not working:

lfoster0 commented 3 years ago

Additionally running with --verbose doesn't show any errors or offer more insight

mrbass21 commented 2 years ago

Seeing the same thing. I'm using it on a project that has a Tests/ folder and Sources/ folder. Trying to set the source files with the command line switch runs it for the whole project and our test files are showing up as coverage.

Running Slather 2.7.2.

ykhandelwal913 commented 2 years ago

I am seeing the same thing. Anyone has a workaround to include other source/classes files?

Morkrom commented 1 year ago

Observing the same behavior today. I'm also not clear: Assuming the source path is specified, and it's working as expected, would that negate the need to exclude other paths that aren't part of that source path ie pods, etc?

mrdanb commented 1 year ago

I am also seeing the same issue in slather 2.7.3

ObjectiveCesar commented 1 year ago

Why is this still an issue?

PowerOfCreation commented 1 year ago

Can confirm, not working with 2.7.4

jonduenas commented 1 year ago

Anyone have any updates? Workarounds? Trying to ignore our third party dependencies but slather is not respecting this parameter.

tichise commented 1 year ago

I have the same problem.

j1nma commented 11 months ago

Same thing! 🙏 an update or something