Skip to content

Commit 9735908

Browse files
committed
Release 5.4.1
1 parent 3f17004 commit 9735908

File tree

18 files changed

+60
-42
lines changed

18 files changed

+60
-42
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
solution: 'src\ReportGenerator.sln'
77
buildPlatform: Any CPU
88
buildConfiguration: Release
9-
version: 5.4.0
9+
version: 5.4.1
1010
dotnetSDKVersion: 9.0.100
1111
nodeVersion: 20
1212

docs/main-UYTETIBF.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AzureDevopsTask/ReportGenerator/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 5,
1515
"Minor": 4,
16-
"Patch": 0
16+
"Patch": 1
1717
},
1818
"instanceNameFormat": "ReportGenerator",
1919
"groups": [

src/AzureDevopsTask/vss-extension.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifestVersion": 1,
33
"id": "reportgenerator",
44
"name": "ReportGenerator",
5-
"version": "5.4.0",
5+
"version": "5.4.1",
66
"publisher": "Palmmedia",
77
"public": true,
88
"targets": [

src/Deployment/nuget/Readme_ReportGenerator.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotC
1313

1414
### .NET Core
1515
```
16-
dotnet $(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net8.0\ReportGenerator.dll [options]
17-
$(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net8.0\ReportGenerator.exe [options]
16+
dotnet $(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net8.0\ReportGenerator.dll [options]
17+
$(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net8.0\ReportGenerator.exe [options]
1818
```
1919

2020
### .NET Framework
2121
```
22-
$(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net47\ReportGenerator.exe [options]
22+
$(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net47\ReportGenerator.exe [options]
2323
```
2424

2525
## Additional information

src/Deployment/nuget/Readme_dotnet-reportgenerator-globaltool.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotC
1313

1414
### Installation
1515
```
16-
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.0
16+
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.1
1717
18-
dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version 5.4.0
18+
dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version 5.4.1
1919
2020
dotnet new tool-manifest
21-
dotnet tool install dotnet-reportgenerator-globaltool --version 5.4.0
21+
dotnet tool install dotnet-reportgenerator-globaltool --version 5.4.1
2222
```
2323

2424
### Execution

src/Readme.txt

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ For further details take a look at LICENSE.txt.
6767

6868
CHANGELOG
6969

70+
5.4.1.0
71+
72+
* Fix: #707 Fixed issue with file filters
73+
7074
5.4.0.0
7175

7276
* New: Added support for .NET 9. Dropped support for .NET 6 and .NET 7

src/ReportGenerator.Console.NetCore/Properties/launchSettings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"profiles": {
33
"ReportGenerator.Console.NetCore": {
44
"commandName": "Project",
5-
"commandLineArgs": "\"-reports:C:\\Users\\Daniel Palme\\Desktop\\OpenCover.xml\" \"-targetdir:C:\\Users\\Daniel Palme\\Desktop\\coverage3\" \"-historydir:C:\\Users\\Daniel Palme\\Desktop\\samplehistory\" -reporttypes:Html;"
5+
"commandLineArgs": "\"-reports:..\\..\\..\\..\\..\\src\\Testprojects\\CSharp\\Reports\\Cobertura_coverlet.xml\" \"-targetdir:C:\\Users\\Daniel Palme\\Desktop\\coverage2\" -reporttypes:Html; -filefilters:-*Abstract*.cs"
66
}
77
}
88
}

src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>ReportGenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.Console.NetCore.Program</StartupObject>
10-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
11-
<FileVersion>5.4.0.0</FileVersion>
10+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
11+
<FileVersion>5.4.1.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.Console/ReportGenerator.Console.Net.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<AssemblyTitle>ReportGenerator.Console</AssemblyTitle>
99
<Product>ReportGenerator.Console</Product>
1010
<Copyright>Copyright © 2022</Copyright>
11-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
12-
<FileVersion>5.4.0.0</FileVersion>
11+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
12+
<FileVersion>5.4.1.0</FileVersion>
1313
<OutputPath>bin\$(Configuration)\</OutputPath>
1414
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1515
</PropertyGroup>

src/ReportGenerator.Core.Test/Parser/Filtering/DefaultFilterTest.cs

+21-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void NoFilter_AnyElement_ElementIsAccepted()
2222
[Fact]
2323
public void OnlyIncludes_MatchingElement_ElementIsAccepted()
2424
{
25-
IFilter filter = new DefaultFilter(new[] { "+Test" });
25+
IFilter filter = new DefaultFilter(["+Test"]);
2626

2727
Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
2828
Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
@@ -32,7 +32,7 @@ public void OnlyIncludes_MatchingElement_ElementIsAccepted()
3232
[Fact]
3333
public void OnlyIncludes_NotMatchingElement_ElementIsNotAccepted()
3434
{
35-
IFilter filter = new DefaultFilter(new[] { "+Test" });
35+
IFilter filter = new DefaultFilter(["+Test"]);
3636

3737
Assert.False(filter.IsElementIncludedInReport("Test123"), "Element is expected to be excluded.");
3838
Assert.False(filter.IsElementIncludedInReport("test123"), "Element is expected to be excluded.");
@@ -42,7 +42,7 @@ public void OnlyIncludes_NotMatchingElement_ElementIsNotAccepted()
4242
[Fact]
4343
public void OnlyIncludesWithWildcards_MatchingElement_ElementIsAccepted()
4444
{
45-
IFilter filter = new DefaultFilter(new[] { "+Test*" });
45+
IFilter filter = new DefaultFilter(["+Test*"]);
4646

4747
Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
4848
Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
@@ -54,7 +54,7 @@ public void OnlyIncludesWithWildcards_MatchingElement_ElementIsAccepted()
5454
[Fact]
5555
public void OnlyIncludesWithWildcards_NotMatchingElement_ElementIsNotAccepted()
5656
{
57-
IFilter filter = new DefaultFilter(new[] { "+Test*" });
57+
IFilter filter = new DefaultFilter(["+Test*"]);
5858

5959
Assert.False(filter.IsElementIncludedInReport("PrefixTest"), "Element is expected to be excluded.");
6060
Assert.False(filter.IsElementIncludedInReport("prefixtest"), "Element is expected to be excluded.");
@@ -66,7 +66,7 @@ public void OnlyIncludesWithWildcards_NotMatchingElement_ElementIsNotAccepted()
6666
[Fact]
6767
public void IncludesAndExcludes_MatchingElement_ElementIsAccepted()
6868
{
69-
IFilter filter = new DefaultFilter(new[] { "+Test", "-SomeExclude" });
69+
IFilter filter = new DefaultFilter(["+Test", "-SomeExclude"]);
7070

7171
Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
7272
Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
@@ -76,7 +76,7 @@ public void IncludesAndExcludes_MatchingElement_ElementIsAccepted()
7676
[Fact]
7777
public void IncludesAndExcludes_NotMatchingElement_ElementIsNotAccepted()
7878
{
79-
IFilter filter = new DefaultFilter(new[] { "+Test", "-Test" });
79+
IFilter filter = new DefaultFilter(["+Test", "-Test"]);
8080

8181
Assert.False(filter.IsElementIncludedInReport("Test"), "Element is expected to be excluded.");
8282
Assert.False(filter.IsElementIncludedInReport("test"), "Element is expected to be excluded.");
@@ -86,7 +86,7 @@ public void IncludesAndExcludes_NotMatchingElement_ElementIsNotAccepted()
8686
[Fact]
8787
public void IncludesAndExcludesWithWildcards_MatchingElement_ElementIsAccepted()
8888
{
89-
IFilter filter = new DefaultFilter(new[] { "+Test*", "-SomeExclude*" });
89+
IFilter filter = new DefaultFilter(["+Test*", "-SomeExclude*"]);
9090

9191
Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
9292
Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
@@ -98,7 +98,7 @@ public void IncludesAndExcludesWithWildcards_MatchingElement_ElementIsAccepted()
9898
[Fact]
9999
public void IncludesAndExcludesWithWildcards_NotMatchingElement_ElementIsNotAccepted()
100100
{
101-
IFilter filter = new DefaultFilter(new[] { "+Test*", "-Tes*" });
101+
IFilter filter = new DefaultFilter(["+Test*", "-Tes*"]);
102102

103103
Assert.False(filter.IsElementIncludedInReport("Test"), "Element is expected to be excluded.");
104104
Assert.False(filter.IsElementIncludedInReport("test"), "Element is expected to be excluded.");
@@ -110,7 +110,7 @@ public void IncludesAndExcludesWithWildcards_NotMatchingElement_ElementIsNotAcce
110110
[Fact]
111111
public void LinuxPath_NoOsIndependantPathSeparator()
112112
{
113-
IFilter filter = new DefaultFilter(new[] { "+abc/def" });
113+
IFilter filter = new DefaultFilter(["+abc/def"]);
114114

115115
Assert.True(filter.IsElementIncludedInReport("abc/def"), "Element is expected to be included.");
116116
Assert.False(filter.IsElementIncludedInReport("abc\\def"), "Element is expected to be excluded.");
@@ -120,7 +120,7 @@ public void LinuxPath_NoOsIndependantPathSeparator()
120120
[Fact]
121121
public void LinuxPath_OsIndependantPathSeparator()
122122
{
123-
IFilter filter = new DefaultFilter(new[] { "+abc/def" }, true);
123+
IFilter filter = new DefaultFilter(["+abc/def"], true);
124124

125125
Assert.True(filter.IsElementIncludedInReport("abc/def"), "Element is expected to be included.");
126126
Assert.True(filter.IsElementIncludedInReport("abc\\def"), "Element is expected to be included.");
@@ -130,7 +130,7 @@ public void LinuxPath_OsIndependantPathSeparator()
130130
[Fact]
131131
public void WindowsPath_NoOsIndependantPathSeparator()
132132
{
133-
IFilter filter = new DefaultFilter(new[] { "+abc\\def" });
133+
IFilter filter = new DefaultFilter(["+abc\\def"]);
134134

135135
Assert.False(filter.IsElementIncludedInReport("abc/def"), "Element is expected to be excluded.");
136136
Assert.True(filter.IsElementIncludedInReport("abc\\def"), "Element is expected to be included.");
@@ -140,11 +140,20 @@ public void WindowsPath_NoOsIndependantPathSeparator()
140140
[Fact]
141141
public void WindowsPath_OsIndependantPathSeparator()
142142
{
143-
IFilter filter = new DefaultFilter(new[] { "+abc/def" }, true);
143+
IFilter filter = new DefaultFilter(["+abc/def"], true);
144144

145145
Assert.True(filter.IsElementIncludedInReport("abc/def"), "Element is expected to be included.");
146146
Assert.True(filter.IsElementIncludedInReport("abc\\def"), "Element is expected to be included.");
147147
Assert.True(filter.HasCustomFilters);
148148
}
149+
150+
[Fact]
151+
public void WildCardCorreclyEscapedInOsIndependantPathSeparator()
152+
{
153+
IFilter filter = new DefaultFilter(["-*Class.cs"], true);
154+
155+
Assert.False(filter.IsElementIncludedInReport("SomeClass.cs"), "Element is expected to be excluded.");
156+
Assert.True(filter.HasCustomFilters);
157+
}
149158
}
150159
}

src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>Palmmedia.ReportGenerator.Core.Test</RootNamespace>
7-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
8-
<FileVersion>5.4.0.0</FileVersion>
7+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
8+
<FileVersion>5.4.1.0</FileVersion>
99
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1010
</PropertyGroup>
1111

src/ReportGenerator.Core/Parser/Filtering/DefaultFilter.cs

+9-4
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,20 @@ private static Regex CreateFilterRegex(string filter, bool osIndependantPathSepa
103103
{
104104
filter = filter.Substring(1);
105105
filter = filter.Replace("*", "$$$*");
106+
107+
if (osIndependantPathSeparator)
108+
{
109+
filter = filter
110+
.Replace("/", "$$$pathseparator$$$")
111+
.Replace("\\", "$$$pathseparator$$$");
112+
}
113+
106114
filter = Regex.Escape(filter);
107115
filter = filter.Replace(@"\$\$\$\*", ".*");
108116

109117
if (osIndependantPathSeparator)
110118
{
111-
filter = filter
112-
.Replace("/", "$$$")
113-
.Replace("\\", "$$$")
114-
.Replace("$$$", @"[/\\]");
119+
filter = filter.Replace(@"\$\$\$pathseparator\$\$\$", @"[/\\]");
115120
}
116121

117122
return new Regex($"^{filter}$", RegexOptions.Compiled | RegexOptions.IgnoreCase);

src/ReportGenerator.Core/ReportGenerator.Core.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
88
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
99
<AssemblyName>ReportGenerator.Core</AssemblyName>
10-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
11-
<FileVersion>5.4.0.0</FileVersion>
10+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
11+
<FileVersion>5.4.1.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<PropertyGroup>

src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44
<RootNamespace>ReportGenerator.DotnetCorePluginLoader</RootNamespace>
5-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
6-
<FileVersion>5.4.0.0</FileVersion>
5+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
6+
<FileVersion>5.4.1.0</FileVersion>
77
<GenerateDocumentationFile>True</GenerateDocumentationFile>
88
</PropertyGroup>
99

src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>ReportGenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.DotnetGlobalTool.Program</StartupObject>
10-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
11-
<FileVersion>5.4.0.0</FileVersion>
10+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
11+
<FileVersion>5.4.1.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<RootNamespace>Palmmedia.ReportGenerator.MSBuild</RootNamespace>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
8-
<AssemblyVersion>5.4.0.0</AssemblyVersion>
9-
<FileVersion>5.4.0.0</FileVersion>
8+
<AssemblyVersion>5.4.1.0</AssemblyVersion>
9+
<FileVersion>5.4.1.0</FileVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/build.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- Version, adjust before build -->
2424
<PropertyGroup>
25-
<Version>5.4.0</Version>
25+
<Version>5.4.1</Version>
2626
</PropertyGroup>
2727

2828
<!-- Tools -->

0 commit comments

Comments
 (0)