Skip to content

Commit

Permalink
chore: add code coverage exclusions (#9118)
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev authored Aug 23, 2023
1 parent 22b0bb5 commit 190ca6a
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 190ca6a

Please sign in to comment.