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

chore: add code coverage exclusions #9118

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Docfx.Common/Git/GitUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private static GitRepoInfo GetRepoInfoCore(string directory)
return repoInfo;
}

[ExcludeFromCodeCoverage]
[ExcludeFromCodeCoverage(Justification = "To avoid Codecov report indirect coverage changes")]
private static Tuple<string, string> GetBranchNames(string repoRootPath)
{
// Use the branch name specified by the environment variable.
Expand Down Expand Up @@ -305,6 +305,7 @@ private static Tuple<string, string> GetBranchNames(string repoRootPath)

// Many build systems use a "detached head", which means that the normal git commands
// to get branch names do not work. Thankfully, they set an environment variable.
[ExcludeFromCodeCoverage(Justification = "To avoid Codecov report indirect coverage changes")]
private static Tuple<string, string> GetBranchNamesFromDetachedHead(string repoRootPath)
{
foreach (var name in BuildSystemBranchName)
Expand Down