Skip to content

Commit

Permalink
Release 5.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Nov 13, 2024
1 parent 3f17004 commit 9735908
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
solution: 'src\ReportGenerator.sln'
buildPlatform: Any CPU
buildConfiguration: Release
version: 5.4.0
version: 5.4.1
dotnetSDKVersion: 9.0.100
nodeVersion: 20

Expand Down
2 changes: 1 addition & 1 deletion docs/main-UYTETIBF.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/AzureDevopsTask/ReportGenerator/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 5,
"Minor": 4,
"Patch": 0
"Patch": 1
},
"instanceNameFormat": "ReportGenerator",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion src/AzureDevopsTask/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "reportgenerator",
"name": "ReportGenerator",
"version": "5.4.0",
"version": "5.4.1",
"publisher": "Palmmedia",
"public": true,
"targets": [
Expand Down
6 changes: 3 additions & 3 deletions src/Deployment/nuget/Readme_ReportGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotC

### .NET Core
```
dotnet $(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net8.0\ReportGenerator.dll [options]
$(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net8.0\ReportGenerator.exe [options]
dotnet $(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net8.0\ReportGenerator.dll [options]
$(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net8.0\ReportGenerator.exe [options]
```

### .NET Framework
```
$(UserProfile)\.nuget\packages\reportgenerator\5.4.0\tools\net47\ReportGenerator.exe [options]
$(UserProfile)\.nuget\packages\reportgenerator\5.4.1\tools\net47\ReportGenerator.exe [options]
```

## Additional information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotC

### Installation
```
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.0
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.1
dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version 5.4.0
dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version 5.4.1
dotnet new tool-manifest
dotnet tool install dotnet-reportgenerator-globaltool --version 5.4.0
dotnet tool install dotnet-reportgenerator-globaltool --version 5.4.1
```

### Execution
Expand Down
4 changes: 4 additions & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ For further details take a look at LICENSE.txt.

CHANGELOG

5.4.1.0

* Fix: #707 Fixed issue with file filters

5.4.0.0

* New: Added support for .NET 9. Dropped support for .NET 6 and .NET 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"ReportGenerator.Console.NetCore": {
"commandName": "Project",
"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;"
"commandLineArgs": "\"-reports:..\\..\\..\\..\\..\\src\\Testprojects\\CSharp\\Reports\\Cobertura_coverlet.xml\" \"-targetdir:C:\\Users\\Daniel Palme\\Desktop\\coverage2\" -reporttypes:Html; -filefilters:-*Abstract*.cs"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AssemblyName>ReportGenerator</AssemblyName>
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
<StartupObject>Palmmedia.ReportGenerator.Console.NetCore.Program</StartupObject>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<AssemblyTitle>ReportGenerator.Console</AssemblyTitle>
<Product>ReportGenerator.Console</Product>
<Copyright>Copyright © 2022</Copyright>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
Expand Down
33 changes: 21 additions & 12 deletions src/ReportGenerator.Core.Test/Parser/Filtering/DefaultFilterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void NoFilter_AnyElement_ElementIsAccepted()
[Fact]
public void OnlyIncludes_MatchingElement_ElementIsAccepted()
{
IFilter filter = new DefaultFilter(new[] { "+Test" });
IFilter filter = new DefaultFilter(["+Test"]);

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

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

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

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

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

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

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

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

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

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

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

Assert.True(filter.IsElementIncludedInReport("abc/def"), "Element is expected to be included.");
Assert.True(filter.IsElementIncludedInReport("abc\\def"), "Element is expected to be included.");
Assert.True(filter.HasCustomFilters);
}

[Fact]
public void WildCardCorreclyEscapedInOsIndependantPathSeparator()
{
IFilter filter = new DefaultFilter(["-*Class.cs"], true);

Assert.False(filter.IsElementIncludedInReport("SomeClass.cs"), "Element is expected to be excluded.");
Assert.True(filter.HasCustomFilters);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>Palmmedia.ReportGenerator.Core.Test</RootNamespace>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

Expand Down
13 changes: 9 additions & 4 deletions src/ReportGenerator.Core/Parser/Filtering/DefaultFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,20 @@ private static Regex CreateFilterRegex(string filter, bool osIndependantPathSepa
{
filter = filter.Substring(1);
filter = filter.Replace("*", "$$$*");

if (osIndependantPathSeparator)
{
filter = filter
.Replace("/", "$$$pathseparator$$$")
.Replace("\\", "$$$pathseparator$$$");
}

filter = Regex.Escape(filter);
filter = filter.Replace(@"\$\$\$\*", ".*");

if (osIndependantPathSeparator)
{
filter = filter
.Replace("/", "$$$")
.Replace("\\", "$$$")
.Replace("$$$", @"[/\\]");
filter = filter.Replace(@"\$\$\$pathseparator\$\$\$", @"[/\\]");
}

return new Regex($"^{filter}$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
Expand Down
4 changes: 2 additions & 2 deletions src/ReportGenerator.Core/ReportGenerator.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AssemblyName>ReportGenerator.Core</AssemblyName>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<RootNamespace>ReportGenerator.DotnetCorePluginLoader</RootNamespace>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AssemblyName>ReportGenerator</AssemblyName>
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
<StartupObject>Palmmedia.ReportGenerator.DotnetGlobalTool.Program</StartupObject>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RootNamespace>Palmmedia.ReportGenerator.MSBuild</RootNamespace>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AssemblyVersion>5.4.0.0</AssemblyVersion>
<FileVersion>5.4.0.0</FileVersion>
<AssemblyVersion>5.4.1.0</AssemblyVersion>
<FileVersion>5.4.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<!-- Version, adjust before build -->
<PropertyGroup>
<Version>5.4.0</Version>
<Version>5.4.1</Version>
</PropertyGroup>

<!-- Tools -->
Expand Down

0 comments on commit 9735908

Please sign in to comment.