-
-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'adison88-add-hideskipped-setting-2703' into develop
- Loading branch information
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/Cake.Common/Tools/OpenCover/OpenCoverHideSkippedOption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Cake.Common.Tools.OpenCover | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Represents the hide skipped option for OpenCover. | ||
/// </summary> | ||
[Flags] | ||
public enum OpenCoverHideSkippedOption | ||
{ | ||
/// <summary> | ||
/// Removes no information from output file. | ||
/// </summary> | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Removes information from output files that relates to classes/modules that have been skipped (filtered) due to use of the -excludebyfile -switch. | ||
/// </summary> | ||
File = 1, | ||
|
||
/// <summary> | ||
/// Removes information from output files that relates to classes/modules that have been skipped (filtered) due to use of the -filter -switch. | ||
/// </summary> | ||
Filter = 2, | ||
|
||
/// <summary> | ||
/// Removes information from output files that relates to classes/modules that have been skipped (filtered) due to use of the -excludebyattribute -switch. | ||
/// </summary> | ||
Attribute = 4, | ||
|
||
/// <summary> | ||
/// Removes missing Pdb information from output file. | ||
/// </summary> | ||
MissingPdb = 8, | ||
|
||
/// <summary> | ||
/// Removes all information from output file. | ||
/// </summary> | ||
All = File | Filter | Attribute | MissingPdb | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/Cake.Common/Tools/OpenCover/OpenCoverHideSkippedOptionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Cake.Common.Tools.OpenCover | ||
{ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// Extensions class for <see cref="OpenCoverHideSkippedOption"/>. | ||
/// </summary> | ||
public static class OpenCoverHideSkippedOptionExtensions | ||
{ | ||
/// <summary> | ||
/// Get flags. | ||
/// </summary> | ||
/// <param name="openCoverHideSkippedOption"> | ||
/// The input. | ||
/// </param> | ||
/// <returns> | ||
/// The <see cref="IEnumerable"/>. | ||
/// </returns> | ||
public static IEnumerable<OpenCoverHideSkippedOption> GetFlags(this OpenCoverHideSkippedOption openCoverHideSkippedOption) | ||
{ | ||
foreach (OpenCoverHideSkippedOption value in Enum.GetValues(openCoverHideSkippedOption.GetType())) | ||
{ | ||
if (openCoverHideSkippedOption.HasFlag(value)) | ||
{ | ||
yield return value; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters