Skip to content

Commit 901c8fa

Browse files
authored
Merge pull request #2947 from fluentassertions/release-8.0
Release 8.0
2 parents c5b2f9a + df7e9bf commit 901c8fa

File tree

669 files changed

+46339
-49303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

669 files changed

+46339
-49303
lines changed

.editorconfig

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,19 @@ dotnet_diagnostic.CA1307.severity = error
146146
dotnet_diagnostic.CA1308.severity = error
147147
# CA1309: Use ordinal StringComparison
148148
dotnet_diagnostic.CA1309.severity = error
149+
150+
# Purpose: Rename virtual/interface member ITestFramework.Throw(string) so that it no longer conflicts with the reserved language keyword 'Throw'
151+
# Reason: We don't care about other languages than C#
152+
dotnet_diagnostic.CA1716.severity = none
153+
149154
# CA1724: Type names should not match namespaces
150155
dotnet_diagnostic.CA1724.severity = none
151156
# CA1819: Properties should not return arrays
152157
dotnet_diagnostic.CA1819.severity = none
153158
# CA1851: Possible multiple enumerations of IEnumerable collection. Related to GH-issue #2000
154159
dotnet_diagnostic.CA1851.severity = suggestion
160+
# CA1859: Use concrete types when possible for improved performance
161+
dotnet_diagnostic.CA1859.severity = suggestion
155162
# CA1860: Avoid using 'Enumerable.Any()' extension method
156163
dotnet_diagnostic.CA1860.severity = warning
157164
# CA1861: Avoid constant arrays as arguments
@@ -197,6 +204,11 @@ dotnet_diagnostic.SA1116.severity = none
197204
dotnet_diagnostic.SA1117.severity = none
198205
# SA1200: Using directive should appear within a namespace declaration
199206
dotnet_diagnostic.SA1200.severity = none
207+
208+
# Purpose: Use string. Empty for empty strings
209+
# Reason: There's no performance difference. See https://medium.com/@dk.kravtsov/string-empty-vs-in-c-70c64971161f
210+
dotnet_diagnostic.SA1122.severity = none
211+
200212
# SA1124: Do not use regions
201213
dotnet_diagnostic.SA1124.severity = none
202214
# SA1201: A property should not follow a method
@@ -373,10 +385,6 @@ dotnet_diagnostic.RCS1237.severity = none
373385
# RCS1228: Unused element in documentation comment. (Equivalent to SA1614)
374386
dotnet_diagnostic.RCS1228.severity = suggestion
375387

376-
# Purpose: Use element access
377-
# Reason: Don't want to force this in this branch
378-
dotnet_diagnostic.RCS1246.severity = suggestion
379-
380388
# Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter
381389
dotnet_diagnostic.MA0002.severity = suggestion
382390

.github/FUNDING.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/01_bug_report.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: 🐞 Bug Report
2-
description: Create a report to help us improve
2+
description: Create a report to help us improve
33
labels: ["bug", "triage"]
44
body:
55
- type: markdown
66
attributes:
77
value: |
88
We welcome bug reports! Please see our [contribution guidelines](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#writing-a-good-bug-report) for more information on writing a good bug report.
9-
9+
1010
**Before continuing, have you:**
1111
1212
* Tried upgrading to newest version of Fluent Assertions, to see if your issue has already been resolved and released?
@@ -88,7 +88,7 @@ body:
8888
description: |
8989
Please provide more information on your .NET configuration:
9090
* Which version of Fluent Assertions are you using?
91-
* Which .NET runtime and version are you targeting? E.g. .NET framework 4.7.1 or .NET 6.
91+
* Which .NET runtime and version are you targeting? E.g. .NET framework 4.7.2 or .NET 6.0.
9292
placeholder: Configuration
9393
validations:
9494
required: false
@@ -104,10 +104,11 @@ body:
104104
- type: dropdown
105105
id: pull-request
106106
attributes:
107-
label: Could you help with a pull-request?
108-
description: Make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
107+
label: Are you willing to help with a pull-request?
108+
description: |
109+
Make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
109110
options:
110111
- "No"
111-
- "Yes"
112+
- "Yes, please assign this issue to me."
112113
validations:
113114
required: true

.github/ISSUE_TEMPLATE/02_api_proposal.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ body:
7070
- type: dropdown
7171
id: pull-request
7272
attributes:
73-
label: Could you help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
74-
description: This is mainly to help demonstrate your suggestion. Please also make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
73+
label: Are you willing to help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
74+
description: |
75+
This is mainly to help demonstrate your suggestion.
76+
Please also make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
7577
options:
7678
- "No"
77-
- "Yes"
79+
- "Yes, please assign this issue to me."
7880
validations:
7981
required: true

.github/ISSUE_TEMPLATE/03_general_feature.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ body:
2727
- type: dropdown
2828
id: pull-request
2929
attributes:
30-
label: Could you help with a pull-request?
31-
description: Make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
30+
label: Are you willing help with a pull-request?
31+
description: |
32+
Make sure you have read the sections about [contributing changes](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes) and [dos and don'ts](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#dos-and-donts).
3233
options:
3334
- "No"
34-
- "Yes"
35+
- "Yes, please assign this issue to me."
3536
validations:
3637
required: true

.github/dependabot.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "16:00"
9+
timezone: "Europe/Copenhagen"
10+
11+
- package-ecosystem: "npm"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
day: "monday"
16+
time: "16:00"
17+
timezone: "Europe/Copenhagen"
18+
19+
- package-ecosystem: "bundler"
20+
directory: "/docs"
21+
schedule:
22+
interval: "weekly"
23+
day: "monday"
24+
time: "16:00"
25+
timezone: "Europe/Copenhagen"
26+
27+
- package-ecosystem: "nuget"
28+
directory: "/"
29+
schedule:
30+
interval: "weekly"
31+
day: "monday"
32+
time: "16:00"
33+
timezone: "Europe/Copenhagen"
34+
ignore:
35+
- dependency-name: "System.Collections.Immutable"
36+
- dependency-name: "System.Threading.Tasks.Extensions"
37+
groups:
38+
xunit:
39+
patterns:
40+
- "xunit*"
41+
- "Verify*"
42+
mstest:
43+
patterns:
44+
- "MSTest*"
45+
nuke:
46+
patterns:
47+
- "Nuke*"
48+
nunit:
49+
patterns:
50+
- "NUnit*"

.github/workflows/build.yml

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: build
1+
name: Build
22

33
on: [push, pull_request]
44

55
jobs:
66
build:
7-
7+
name: "Build, Test, Analyze and Publish"
88
runs-on: windows-latest
99

1010
env:
@@ -23,6 +23,13 @@ jobs:
2323
7.0.x
2424
8.0.x
2525
26+
- name: Cache .nuke/temp
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
.nuke/temp
31+
key: ${{ runner.os }}-${{ hashFiles('NodeVersion') }}
32+
2633
- name: Run NUKE
2734
run: ./build.ps1
2835
env:
@@ -42,11 +49,16 @@ jobs:
4249
file: TestResults/reports/lcov.info
4350

4451
- name: Upload artifacts
52+
if: always()
4553
uses: actions/upload-artifact@v4
4654
with:
47-
path: ./Artifacts/*
48-
only-unit-tests:
55+
name: windows-artifacts
56+
path: |
57+
./Artifacts/*
58+
./TestResults/*.trx
4959
60+
only-unit-tests:
61+
name: "Run Unit Tests Only"
5062
strategy:
5163
matrix:
5264
os: [ubuntu-24.04, macos-15]
@@ -68,3 +80,32 @@ jobs:
6880
6981
- name: Run NUKE
7082
run: ./build.sh UnitTests
83+
84+
- name: Upload artifacts
85+
if: always()
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: ${{ runner.os }}-artifacts
89+
path: |
90+
./TestResults/*.trx
91+
92+
publish-test-results:
93+
name: "Publish Tests Results"
94+
needs: [ build, only-unit-tests ]
95+
runs-on: ubuntu-latest
96+
permissions:
97+
checks: write
98+
pull-requests: write
99+
if: always()
100+
101+
steps:
102+
- name: Download Artifacts
103+
uses: actions/download-artifact@v4
104+
with:
105+
path: artifacts
106+
107+
- name: Publish Test Results
108+
uses: EnricoMi/publish-unit-test-result-action@v2
109+
with:
110+
comment_mode: always
111+
files: "artifacts/**/**/*.trx"

.github/workflows/codeql.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "develop", "main", "release*" ]
6+
pull_request:
7+
branches: [ "develop", "main", "release*" ]
8+
schedule:
9+
- cron: '00 15 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: 'ubuntu-latest'
15+
timeout-minutes: 360
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'csharp' ]
25+
26+
steps:
27+
- name: Setup .NET SDKs
28+
uses: actions/setup-dotnet@v4
29+
with:
30+
dotnet-version: |
31+
8.0.x
32+
33+
- name: Checkout repository
34+
35+
uses: actions/checkout@v4
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v3
40+
with:
41+
languages: ${{ matrix.language }}
42+
# If you wish to specify custom queries, you can do so here or in a config file.
43+
# By default, queries listed here will override any specified in a config file.
44+
# Prefix the list here with "+" to use these queries and those in the config file.
45+
46+
# For more 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
47+
# queries: security-extended,security-and-quality
48+
49+
- name: Build
50+
run: |
51+
dotnet restore FluentAssertions.sln --configfile nuget.config
52+
dotnet build FluentAssertions.sln --configuration CI --no-restore
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v3
56+
with:
57+
category: "/language:${{matrix.language}}"

.nuke/build.schema.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@
2929
"Clean",
3030
"CodeCoverage",
3131
"Compile",
32+
"InstallNode",
3233
"Pack",
3334
"Push",
3435
"Restore",
3536
"SpellCheck",
3637
"TestFrameworks",
38+
"TestingPlatformFrameworks",
3739
"UnitTests",
38-
"UnitTestsNetCore",
39-
"UnitTestsNetFramework"
40+
"UnitTestsNet47",
41+
"UnitTestsNet6OrGreater",
42+
"VSTestFrameworks"
4043
]
4144
},
4245
"Verbosity": {
@@ -110,6 +113,14 @@
110113
"allOf": [
111114
{
112115
"properties": {
116+
"Configuration": {
117+
"type": "string",
118+
"description": "The solution configuration to build. Default is 'Debug' (local) or 'CI' (server)",
119+
"enum": [
120+
"CI",
121+
"Debug"
122+
]
123+
},
113124
"GenerateBinLog": {
114125
"type": [
115126
"boolean",

0 commit comments

Comments
 (0)