Skip to content

Commit 66dcbb5

Browse files
authored
Merge pull request #2306 from odalet/feature/exclude-from-coverage
Add ExcludeFromCodeCoverage attribute on top of generated GitVersionInformation classes
2 parents ec97682 + 3efb2ab commit 66dcbb5

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

src/GitVersionCore.Tests/VersionConverters/Approved/cs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//------------------------------------------------------------------------------
1010

1111
[global::System.Runtime.CompilerServices.CompilerGenerated]
12+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
1213
static class GitVersionInformation
1314
{
1415
public static string Major = "1";

src/GitVersionCore.Tests/VersionConverters/Approved/fs/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
[<AbstractClass; Sealed>]
1212
[<global.System.Runtime.CompilerServices.CompilerGenerated>]
13+
[<global.System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage>]
1314
module GitVersionInformation
1415
let Major = "1"
1516
let Minor = "2"

src/GitVersionCore.Tests/VersionConverters/Approved/vb/GitVersionInfoGeneratorTests.ShouldCreateFile.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'------------------------------------------------------------------------------
1010

1111
<Global.System.Runtime.CompilerServices.CompilerGenerated()>
12+
<Global.System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage()>
1213
NotInheritable Class GitVersionInformation
1314
Private Sub New()
1415
End Sub

src/GitVersionCore/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was generated by a tool.
44
// GitVersion
@@ -9,6 +9,7 @@
99
//------------------------------------------------------------------------------
1010

1111
[global::System.Runtime.CompilerServices.CompilerGenerated]
12+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
1213
static class GitVersionInformation
1314
{{
1415
{0}

src/GitVersionCore/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was generated by a tool.
44
// GitVersion
@@ -10,5 +10,6 @@
1010

1111
[<AbstractClass; Sealed>]
1212
[<global.System.Runtime.CompilerServices.CompilerGenerated>]
13+
[<global.System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage>]
1314
module GitVersionInformation
1415
{0}

src/GitVersionCore/VersionConverters/GitVersionInfo/Templates/GitVersionInformation.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'------------------------------------------------------------------------------
1+
'------------------------------------------------------------------------------
22
' <auto-generated>
33
' This code was generated by a tool.
44
' GitVersion
@@ -9,6 +9,7 @@
99
'------------------------------------------------------------------------------
1010

1111
<Global.System.Runtime.CompilerServices.CompilerGenerated()>
12+
<Global.System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage()>
1213
NotInheritable Class GitVersionInformation
1314
Private Sub New()
1415
End Sub

0 commit comments

Comments
 (0)