diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 924174dc1..1903d864e 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,10 +3,11 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
- "version": "5.2.1",
+ "version": "5.4.3",
"commands": [
"reportgenerator"
- ]
+ ],
+ "rollForward": false
}
}
-}
+}
\ No newline at end of file
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000000000..437d18dbd
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,81 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "master" ]
+ schedule:
+ - cron: '23 17 * * 1'
+
+env:
+ AZURE_ARTIFACTS_FEED_URL: https://pkgs.dev.azure.com/bertk0374/_packaging/intern/nuget/v3/index.json
+
+permissions:
+ contents: read
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'csharp' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Use only 'java' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+ build-mode: "manual" # Use "auto" for automatic build detection, or "none" to skip the build step.
+
+ - name: Setup dotnet using global.json
+ uses: actions/setup-dotnet@v4
+ with:
+ global-json-file: global.json
+
+ # - name: Restore dependencies
+ # run: dotnet restore
+
+ - run: |
+ echo "Run, Build Application using script"
+ dotnet build -c coverlet.sln
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/issue-close.yml b/.github/workflows/issue-close.yml
index c4a17a05f..fb73d0151 100644
--- a/.github/workflows/issue-close.yml
+++ b/.github/workflows/issue-close.yml
@@ -7,6 +7,9 @@ on:
env:
DAYS_BEFORE_ISSUE_CLOSE: 275
+permissions:
+ contents: read
+
jobs:
close-issues:
runs-on: ubuntu-latest
diff --git a/.github/workflows/issue-inactive.yml b/.github/workflows/issue-inactive.yml
index b2bcfaef2..c80481428 100644
--- a/.github/workflows/issue-inactive.yml
+++ b/.github/workflows/issue-inactive.yml
@@ -7,6 +7,9 @@ on:
env:
DAYS_BEFORE_ISSUE_STALE: 90
+permissions:
+ contents: read
+
jobs:
close-issues:
runs-on: ubuntu-latest
diff --git a/.github/workflows/issue-untriaged.yml b/.github/workflows/issue-untriaged.yml
index 2115d7c30..efe6ee348 100644
--- a/.github/workflows/issue-untriaged.yml
+++ b/.github/workflows/issue-untriaged.yml
@@ -7,6 +7,10 @@ on:
types:
- reopened
- opened
+
+permissions:
+ contents: read
+
jobs:
label_issues:
runs-on: ubuntu-latest
diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml
new file mode 100644
index 000000000..3900e0d51
--- /dev/null
+++ b/.github/workflows/release-draft.yml
@@ -0,0 +1,23 @@
+name: Release Drafter
+
+on:
+ push:
+ branches:
+ - main
+
+permissions:
+ contents: read
+
+jobs:
+ update_release_draft:
+ permissions:
+ contents: write # for release-drafter/release-drafter to create a github release
+ pull-requests: write # for release-drafter/release-drafter to add label to PR
+ runs-on: ubuntu-latest
+ steps:
+ - uses: release-drafter/release-drafter@v6
+ with:
+ prerelease: true
+ prerelease-identifier: beta
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 478b5fc8b..514880624 100644
--- a/.gitignore
+++ b/.gitignore
@@ -316,3 +316,5 @@ coverage.*.opencover.xml
FolderProfile.pubxml
/NuGet.config
+nuget.config
+*.dmp
diff --git a/Directory.Build.props b/Directory.Build.props
index 74a9fdaea..0b0e187d0 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,10 +11,10 @@
snupkg
true
- preview
+ latest
false
true
- preview
+ 12.0
$(NoWarn);NU1507;NU5105;CS1591
true
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 08e359ac2..eba94e254 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,23 +5,33 @@
-
+
+
+ 17.13.9
+ 4.12.0
+
+ 17.13.0
+ 6.13.2
+ 2.0.0
+ 3.0.2
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
+
+
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md
index e56b0b685..b78c5a295 100644
--- a/Documentation/Changelog.md
+++ b/Documentation/Changelog.md
@@ -7,10 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Fixed
+- Fix branchpoint exclusion for sdk 8.0.407 [#1741](https://github.com/coverlet-coverage/coverlet/issues/1741)
+- Use `netstandard2.0` for _coverlet.collector_ and _coverlet.msbuild.tasks_ Packages´
+
+### Improvements
+- Use [xunit.v3](https://xunit.net/docs/getting-started/v3/whats-new) for tests and example code
+
+
+## Release date 2024-01-20
+### Packages
+coverlet.msbuild 6.0.4
+coverlet.console 6.0.4
+coverlet.collector 6.0.4
+
+### Fixed
+- Fix empty coverage report when using include and exclude filters [#1726](https://github.com/coverlet-coverage/coverlet/issues/1726)
+
+## Release date 2024-12-31
+### Packages
+coverlet.msbuild 6.0.3
+coverlet.console 6.0.3
+coverlet.collector 6.0.3
+
+### Fixed
+- Fix RuntimeConfigurationReader to support self-contained builds [#1705](https://github.com/coverlet-coverage/coverlet/pull/1705) by https://github.com/pfeigl
+- Fix inconsistent filenames with UseSourceLink after .NET 8 [#1679](https://github.com/coverlet-coverage/coverlet/issues/1679)
+- Fix hanging tests [#989](https://github.com/coverlet-coverage/coverlet/issues/989)
+- Fix coverlet instrumentation becomes slow after installing dotnet sdk 8.0.200 [#1620](https://github.com/coverlet-coverage/coverlet/issues/1620)
+- Fix upgrading v6.0.1 to v6.0.2 increases instrumentation time [#1649](https://github.com/coverlet-coverage/coverlet/issues/1649)
- Fix Unable to instrument module - NET 8 [#1631](https://github.com/coverlet-coverage/coverlet/issues/1631)
- Fix slow modules filtering process [#1646](https://github.com/coverlet-coverage/coverlet/issues/1646) by https://github.com/BlackGad
- Fix incorrect coverage await using in generic method [#1490](https://github.com/coverlet-coverage/coverlet/issues/1490)
+### Improvements
+- Cache the regex used in InstrumentationHelper [#1693](https://github.com/coverlet-coverage/coverlet/issues/1693)
+- Enable dotnetTool integration tests for linux [#660](https://github.com/coverlet-coverage/coverlet/issues/660)
+
## Release date 2024-03-13
### Packages
coverlet.msbuild 6.0.2
@@ -36,8 +68,8 @@ coverlet.collector 6.0.1
- Uncovered lines in .NET 8 for inheriting records [#1555](https://github.com/coverlet-coverage/coverlet/issues/1555)
- Fix record constructors not covered when SkipAutoProps is true [#1561](https://github.com/coverlet-coverage/coverlet/issues/1561)
- Fix .NET 7 Method Group branch coverage issue [#1447](https://github.com/coverlet-coverage/coverlet/issues/1447)
-- Fix ExcludeFromCodeCoverage does not exclude method in a partial class [#1548](https://github.com/coverlet-coverage/coverlet/issues/1548)
-- Fix ExcludeFromCodeCoverage does not exclude F# task [#1547](https://github.com/coverlet-coverage/coverlet/issues/1547)
+- Fix ExcludeFromCodeCoverage does not exclude method in a partial class [#1548](https://github.com/coverlet-coverage/coverlet/issues/1548)
+- Fix ExcludeFromCodeCoverage does not exclude F# task [#1547](https://github.com/coverlet-coverage/coverlet/issues/1547)
- Fix issues where ExcludeFromCodeCoverage ignored [#1431](https://github.com/coverlet-coverage/coverlet/issues/1431)
- Fix issues with ExcludeFromCodeCoverage attribute [#1484](https://github.com/coverlet-coverage/coverlet/issues/1484)
- Fix broken links in documentation [#1514](https://github.com/coverlet-coverage/coverlet/issues/1514)
diff --git a/Documentation/ConsumeNightlyBuild.md b/Documentation/ConsumeNightlyBuild.md
index 3901f70a5..91b57cbde 100644
--- a/Documentation/ConsumeNightlyBuild.md
+++ b/Documentation/ConsumeNightlyBuild.md
@@ -33,7 +33,7 @@ PM> Install-Package coverlet.msbuild -Version X.X.X-preview.X.XXX -Source https:
Example:
```powershell
-PM> Install-Package coverlet.msbuild -Version 3.0.4-preview.4.g5de0ad7d60 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
+PM> Install-Package coverlet.msbuild -Version 6.0.4-preview.4.g5de0ad7d60 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
```
### .NET CLI
@@ -45,7 +45,7 @@ PM> Install-Package coverlet.msbuild -Version 3.0.4-preview.4.g5de0ad7d60 -Sourc
Example:
```bash
- dotnet add package coverlet.msbuild --version 3.0.4-preview.4.g5de0ad7d60 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
+ dotnet add package coverlet.msbuild --version 6.0.4-preview.4.g5de0ad7d60 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
```
### MSBuild project file
@@ -57,5 +57,5 @@ Example:
Example:
```xml
-
+
```
diff --git a/Documentation/DriversFeatures.md b/Documentation/DriversFeatures.md
index 8579c79c4..e48f9467a 100644
--- a/Documentation/DriversFeatures.md
+++ b/Documentation/DriversFeatures.md
@@ -8,8 +8,8 @@ In the table below we keep track of main differences:
| Feature | MSBuild | .NET Tool | DataCollectors |
|:-----------------------------------|:--------------|--------------|------------------|
-| .NET Core support(>= 2.0) | Yes | Yes | Yes |
-| .NET Framework support(>= 4.6.1) | Yes | Yes | Yes(since 3.0.0) |
+| .NET Core support(>= 6.0) | Yes | Yes | Yes |
+| .NET Framework support(>= 4.7.2) | Yes | Yes | Yes(since 3.0.0) |
| Show result on console | Yes | Yes | No |
| Deterministic reports output folder| Yes | Yes | No |
| Merge reports | Yes | Yes | No |
diff --git a/Documentation/Examples/MSBuild/DeterministicBuild/HowTo.md b/Documentation/Examples/MSBuild/DeterministicBuild/HowTo.md
index 60ddebbef..ffe46ca71 100644
--- a/Documentation/Examples/MSBuild/DeterministicBuild/HowTo.md
+++ b/Documentation/Examples/MSBuild/DeterministicBuild/HowTo.md
@@ -1,4 +1,4 @@
-To run test we need to generates packages to reference in on test project.
+To run test we need to generates packages to reference in on test project.
Run from repo root
```shell
@@ -44,9 +44,9 @@ Add msbuild package version generated to `"..\Documentation\Examples\MSBuild\Det
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj b/Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
index 19586970c..96969ce77 100644
--- a/Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
+++ b/Documentation/Examples/MSBuild/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
@@ -7,9 +7,9 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject1/XUnitTestProject1.csproj b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject1/XUnitTestProject1.csproj
index e78fcdd22..f88747048 100644
--- a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject1/XUnitTestProject1.csproj
+++ b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject1/XUnitTestProject1.csproj
@@ -11,12 +11,12 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
-
+
diff --git a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject2/XUnitTestProject2.csproj b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject2/XUnitTestProject2.csproj
index 4346c22c3..348f9a927 100644
--- a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject2/XUnitTestProject2.csproj
+++ b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject2/XUnitTestProject2.csproj
@@ -11,9 +11,9 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject3/XUnitTestProject3.csproj b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject3/XUnitTestProject3.csproj
index 4cdea2dbd..b06c78138 100644
--- a/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject3/XUnitTestProject3.csproj
+++ b/Documentation/Examples/MSBuild/MergeWith/XUnitTestProject3/XUnitTestProject3.csproj
@@ -11,9 +11,9 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/VSTest/DeterministicBuild/HowTo.md b/Documentation/Examples/VSTest/DeterministicBuild/HowTo.md
index c25b9cd50..f14a48124 100644
--- a/Documentation/Examples/VSTest/DeterministicBuild/HowTo.md
+++ b/Documentation/Examples/VSTest/DeterministicBuild/HowTo.md
@@ -44,9 +44,9 @@ Add collectors package version generated to `"..\Documentation\Examples\VSTest\D
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/VSTest/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj b/Documentation/Examples/VSTest/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
index d63628b1e..556574ff0 100644
--- a/Documentation/Examples/VSTest/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
+++ b/Documentation/Examples/VSTest/DeterministicBuild/XUnitTestProject1/XUnitTestProject1.csproj
@@ -7,9 +7,9 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/Examples/VSTest/HelloWorld/XUnitTestProject1/XUnitTestProject1.csproj b/Documentation/Examples/VSTest/HelloWorld/XUnitTestProject1/XUnitTestProject1.csproj
index 3ab4b931e..8c1660832 100644
--- a/Documentation/Examples/VSTest/HelloWorld/XUnitTestProject1/XUnitTestProject1.csproj
+++ b/Documentation/Examples/VSTest/HelloWorld/XUnitTestProject1/XUnitTestProject1.csproj
@@ -8,9 +8,9 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Documentation/GlobalTool.md b/Documentation/GlobalTool.md
index 99a9f9b4c..e91f67c9d 100644
--- a/Documentation/GlobalTool.md
+++ b/Documentation/GlobalTool.md
@@ -9,40 +9,43 @@ coverlet --help
The current options are (output of `coverlet --help`):
```text
-Cross platform .NET Core code coverage tool 6.0.0.0
+Description:
+ Cross platform .NET Core code coverage tool
-Usage: coverlet [arguments] [options]
+Usage:
+ coverlet.console [options]
Arguments:
- Path to the test assembly or application directory.
+ Path to the test assembly or application directory.
Options:
- -t|--target (REQUIRED) Path to the test runner application.
- -a|--targetargs Arguments to be passed to the test runner.
- -o|--output Output of the generated coverage report
- -v|--verbosity Sets the verbosity level of the command. Allowed values are quiet, minimal, normal, detailed.
- -f|--format Format of the generated coverage report. [default: json]
- --threshold Exits with error if the coverage % is below value.
- --threshold-type Coverage type to apply the threshold to.
- --threshold-stat Coverage statistic used to enforce the threshold value. [default: Minimum]
- --exclude Filter expressions to exclude specific modules and types.
- --include Filter expressions to include only specific modules and types.
- --exclude-by-file Glob patterns specifying source files to exclude.
- --include-directory Include directories containing additional assemblies to be instrumented.
- --exclude-by-attribute Attributes to exclude from code coverage.
- --include-test-assembly Specifies whether to report code coverage of the test assembly.
- --single-hit Specifies whether to limit code coverage hit reporting to a single hit for each location
- --skipautoprops Neither track nor record auto-implemented properties.
- --merge-with Path to existing coverage result to merge.
- --use-source-link Specifies whether to use SourceLink URIs in place of file system paths.
- --does-not-return-attribute Attributes that mark methods that do not return.
- --exclude-assemblies-without-sources Specifies behaviour of heuristic to ignore assemblies with missing source documents.
- --source-mapping-file Specifies the path to a SourceRootsMappings file.
- --version Show version information
- -?, -h, --help Show help and usage information
+ -t, --target (REQUIRED) Path to the test runner application.
+ -a, --targetargs Arguments to be passed to the test runner.
+ -o, --output