Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not ignore subfolder with name equal to root #546

Merged
merged 1 commit into from
Dec 16, 2020
Merged

Do not ignore subfolder with name equal to root #546

merged 1 commit into from
Dec 16, 2020

Conversation

vitorenesduarte
Copy link
Contributor

Before this commit, a subfolder with the same name as the root/source folder would be ignored from the coverage reports (see #483). This was occurring because the ancestor of the subfolder was being pruned (because it matched the end of the source folder) in the method used to guess the absolute path. This resulted in an incorrect guess of the absolute path.

With this commit, we first check whether the join of the subfolder relative path with the source folder exists, and if so, return it as the guess of the absolute path. If the join doesn't exist, we use the previous guess method.

src/path_rewriting.rs Outdated Show resolved Hide resolved
src/path_rewriting.rs Outdated Show resolved Hide resolved
Before this commit, a subfolder with the same name as the root/source
folder would be ignored from the coverage reports (see
#483). This was occurring because
the ancestor of the subfolder was being pruned (because it matched the
end of the source folder) in the method used to guess the absolute path.
This resulted in an incorrect guess of the absolute path.

With this commit, we first check whether the join of the subfolder
relative path with the source folder exists, and if so, return it as the
guess of the absolute path. If the join doesn't exist, we use the
previous guess method.
@vitorenesduarte
Copy link
Contributor Author

@marco-c I've addressed your comments. (I force-pushed as the diff is small.)

@marco-c marco-c merged commit 33ecb24 into mozilla:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subfolder will be missed in reports if it has the same name as the root folder
2 participants