diff --git a/src/Docfx.Common/Git/GitUtility.cs b/src/Docfx.Common/Git/GitUtility.cs index 70e4411a0f6..2af47c402cc 100644 --- a/src/Docfx.Common/Git/GitUtility.cs +++ b/src/Docfx.Common/Git/GitUtility.cs @@ -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 GetBranchNames(string repoRootPath) { // Use the branch name specified by the environment variable. @@ -305,6 +305,7 @@ private static Tuple 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 GetBranchNamesFromDetachedHead(string repoRootPath) { foreach (var name in BuildSystemBranchName)