SlatherOrg / slather

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

Consider the case where multiple phrases appear in line #483

Closed fchiba closed 3 years ago

fchiba commented 3 years ago

This PR is intended to fix #480

error cause

If line is "if(_var && _var.foo) {" and regions is ["_var", "_var.foo", "{"],

After the first loop,

expected: reminder should be " && _var.foo) {"

actual: reminder is " && "

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 96.176% when pulling 2a4903be5b8e49e9425734b5f267294817c9c746 on fchiba:fix-480 into 1abd2a31351011489d009ec591db4383989f92fa on SlatherOrg:master.

ksuther commented 3 years ago

@hborawski Would love your feedback on this since it was your PR. Thanks!

hborawski commented 3 years ago

It looks good to me, I guess the split did not behave how I expected it to. Great find!

ksuther commented 3 years ago

Thanks for the PR!

rogerluan commented 3 years ago

Thanks for this fix! I was also facing this problem.

It'd be great to have this PR released in an official release 😊 but until then, if anyone's facing this problem as well, modify your Gemfile as such:

gem 'slather', github: 'SlatherOrg/slather', branch: 'master'