Skip to content

Commit

Permalink
Merge pull request #2270 from dennisdoomen/Release612
Browse files Browse the repository at this point in the history
Release 6.12
  • Loading branch information
dennisdoomen committed Aug 23, 2023
2 parents 4105901 + a6f615b commit 340af80
Show file tree
Hide file tree
Showing 149 changed files with 1,081,088 additions and 1,296 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Expand Up @@ -152,6 +152,10 @@ dotnet_diagnostic.CA1724.severity = none
dotnet_diagnostic.CA1819.severity = none
# CA1851: Possible multiple enumerations of IEnumerable collection. Related to GH-issue #2000
dotnet_diagnostic.CA1851.severity = suggestion
# CA1860: Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = warning
# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = none
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = none
# CA2225: Operator overloads have named alternates
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug_report.yml
Expand Up @@ -101,3 +101,13 @@ body:
placeholder: Other information
validations:
required: false
- type: dropdown
id: pull-request
attributes:
label: Could you help with a pull-request?
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).
options:
- "No"
- "Yes"
validations:
required: true
12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/02_api_proposal.yml
Expand Up @@ -66,4 +66,14 @@ body:
Please mention any risks that to your knowledge the API proposal might entail, such as breaking changes, performance regressions, etc. If you are proposing a new overload of `Should()` include what type it currently resolves to for the type in question.
placeholder: Risks
validations:
required: false
required: false
- type: dropdown
id: pull-request
attributes:
label: Could you help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
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).
options:
- "No"
- "Yes"
validations:
required: true
12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/03_general_feature.yml
Expand Up @@ -23,4 +23,14 @@ body:
Please provide alternatives you have thought about.
placeholder: Alternative designs
validations:
required: false
required: false
- type: dropdown
id: pull-request
attributes:
label: Could you help with a pull-request?
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).
options:
- "No"
- "Yes"
validations:
required: true
5 changes: 4 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,3 +1,6 @@
<!-- Please provide a description of your changes above the IMPORTANT checklist -->


## IMPORTANT

* [ ] If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
Expand All @@ -6,4 +9,4 @@
* [ ] If the PR adds a feature or fixes a bug, please update [the release notes](../tree/develop/docs/_pages/releases.md) with a functional description that explains what the change means to consumers of this library, which are published on the [website](https://fluentassertions.com/releases).
* [ ] If the PR changes the public API the changes needs to be included by running [AcceptApiChanges.ps1](../tree/develop/AcceptApiChanges.ps1) or [AcceptApiChanges.sh](../tree/develop/AcceptApiChanges.sh).
* [ ] If the PR affects [the documentation](../tree/develop/docs/_pages), please include your changes in this pull request so the documentation will appear on the [website](https://www.fluentassertions.com/introduction).
* [ ] Please also run `./build.sh --target spellcheck` or `.\build.ps1 --target spellcheck` before pushing and check the good outcome
* [ ] Please also run `./build.sh --target spellcheck` or `.\build.ps1 --target spellcheck` before pushing and check the good outcome
26 changes: 26 additions & 0 deletions .github/workflows/code_quality.yml
@@ -0,0 +1,26 @@
name: Qodana

on:
workflow_dispatch:
pull_request_target:
push:
branches:
- master
- develop

jobs:
qodana-scan:
name: Qodana Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2
with:
upload-result: ${{ github.ref_name == 'master' || github.ref_name == 'develop' }}
args: --baseline,qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
4 changes: 2 additions & 2 deletions .nuke/build.schema.json
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
Expand Down Expand Up @@ -128,4 +128,4 @@
}
}
}
}
}
40 changes: 22 additions & 18 deletions Build/Build.cs
Expand Up @@ -60,19 +60,19 @@ class Build : NukeBuild
[GitRepository]
readonly GitRepository GitRepository;

[PackageExecutable("nspec", "NSpecRunner.exe", Version = "3.1.0")]
[NuGetPackage("nspec", "NSpecRunner.exe", Version = "3.1.0")]
Tool NSpec3;

#if OS_WINDOWS
[PackageExecutable("Node.js.redist", "node.exe", Version = "16.17.1", Framework = "win-x64")]
[NuGetPackage("Node.js.redist", "node.exe", Version = "16.20.0", Framework = "win-x64")]
#elif OS_MAC
[PackageExecutable("Node.js.redist", "node", Version = "16.17.1", Framework = "osx-x64")]
[NuGetPackage("Node.js.redist", "node", Version = "16.20.0", Framework = "osx-x64")]
#else
[PackageExecutable("Node.js.redist", "node", Version = "16.17.1", Framework = "linux-x64")]
[NuGetPackage("Node.js.redist", "node", Version = "16.20.0", Framework = "linux-x64")]
#endif
Tool Node;

string YarnCli => $"{ToolPathResolver.GetPackageExecutable("Yarn.MSBuild", "yarn.js", "1.22.19")} --silent";
string YarnCli => $"{NuGetToolPathResolver.GetPackageExecutable("Yarn.MSBuild", "yarn.js", "1.22.19")}";

AbsolutePath ArtifactsDirectory => RootDirectory / "Artifacts";

Expand All @@ -84,8 +84,8 @@ class Build : NukeBuild
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
.Executes(() =>
{
EnsureCleanDirectory(ArtifactsDirectory);
EnsureCleanDirectory(TestResultsDirectory);
ArtifactsDirectory.CreateOrCleanDirectory();
TestResultsDirectory.CreateOrCleanDirectory();
});

Target CalculateNugetVersion => _ => _
Expand Down Expand Up @@ -162,7 +162,9 @@ class Build : NukeBuild
Project[] Projects => new[]
{
Solution.Specs.FluentAssertions_Specs,
Solution.Specs.FluentAssertions_Equivalency_Specs
Solution.Specs.FluentAssertions_Equivalency_Specs,
Solution.Specs.FSharp_Specs,
Solution.Specs.VB_Specs
};

Target UnitTestsNetFramework => _ => _
Expand All @@ -171,8 +173,10 @@ class Build : NukeBuild
.OnlyWhenDynamic(() => EnvironmentInfo.IsWin && (RunAllTargets || HasSourceChanges))
.Executes(() =>
{
IEnumerable<string> testAssemblies = Projects
.SelectMany(project => GlobFiles(project.Directory, "bin/Debug/net47/*.Specs.dll"));
string[] testAssemblies = Projects
.SelectMany(project => project.Directory.GlobFiles("bin/Debug/net47/*.Specs.dll"))
.Select(_ => _.ToString())
.ToArray();
Assert.NotEmpty(testAssemblies.ToList());
Expand Down Expand Up @@ -248,7 +252,7 @@ void ReportTestOutcome(params string[] globFilters)
.Executes(() =>
{
ReportGenerator(s => s
.SetProcessToolPath(ToolPathResolver.GetPackageExecutable("ReportGenerator", "ReportGenerator.dll", framework: "net6.0"))
.SetProcessToolPath(NuGetToolPathResolver.GetPackageExecutable("ReportGenerator", "ReportGenerator.dll", framework: "net6.0"))
.SetTargetDirectory(TestResultsDirectory / "reports")
.AddReports(TestResultsDirectory / "**/coverage.cobertura.xml")
.AddReportTypes(
Expand Down Expand Up @@ -299,7 +303,7 @@ void ReportTestOutcome(params string[] globFilters)
if (EnvironmentInfo.IsWin)
{
NSpec3(Solution.TestFrameworks.NSpec3_Net47_Specs.Directory / "bin" / "Debug" / "net47" / "NSpec3.Specs.dll");
NSpec3($"{Solution.TestFrameworks.NSpec3_Net47_Specs.Directory / "bin" / "Debug" / "net47" / "NSpec3.Specs.dll"}");
}
ReportTestOutcome(projects.Select(p => $"*{p.Name}*.trx").ToArray());
Expand Down Expand Up @@ -334,9 +338,9 @@ void ReportTestOutcome(params string[] globFilters)
.ProceedAfterFailure()
.Executes(() =>
{
IReadOnlyCollection<string> packages = GlobFiles(ArtifactsDirectory, "*.nupkg");
var packages = ArtifactsDirectory.GlobFiles("*.nupkg");
Assert.NotEmpty(packages.ToList());
Assert.NotEmpty(packages);
DotNetNuGetPush(s => s
.SetApiKey(NuGetApiKey)
Expand All @@ -352,9 +356,9 @@ void ReportTestOutcome(params string[] globFilters)
.ProceedAfterFailure()
.Executes(() =>
{
Node($"{YarnCli} install", workingDirectory: RootDirectory);
Node($"{YarnCli} run cspell", workingDirectory: RootDirectory,
customLogger: (_, msg) => Error(msg));
Node($"{YarnCli} --silent install", workingDirectory: RootDirectory);
Node($"{YarnCli} --silent run cspell", workingDirectory: RootDirectory,
logger: (_, msg) => Error(msg));
});

bool HasDocumentationChanges => Changes.Any(x => IsDocumentation(x));
Expand Down Expand Up @@ -384,5 +388,5 @@ void ReportTestOutcome(params string[] globFilters)

bool RunAllTargets => string.IsNullOrWhiteSpace(PullRequestBase) || Changes.Any(x => x.StartsWith("Build"));

bool IsTag => BranchSpec != null && BranchSpec.Contains("refs/tags", StringComparison.InvariantCultureIgnoreCase);
bool IsTag => BranchSpec != null && BranchSpec.Contains("refs/tags", StringComparison.OrdinalIgnoreCase);
}
14 changes: 7 additions & 7 deletions Build/_build.csproj
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -19,12 +19,12 @@
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
<PackageDownload Include="NSpec" Version="[3.1.0]" />
<PackageDownload Include="ReportGenerator" Version="[5.1.19]" />
<PackageDownload Include="xunit.runner.console" Version="[2.4.2]" />
<PackageDownload Include="Node.js.redist" Version="[16.17.1]" />
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0182" />
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="Nuke.Components" Version="6.3.0" />
<PackageDownload Include="ReportGenerator" Version="[5.1.23]" />
<PackageDownload Include="xunit.runner.console" Version="[2.5.0]" />
<PackageDownload Include="Node.js.redist" Version="[16.20.0]" />
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<PackageReference Include="Nuke.Common" Version="7.0.2" />
<PackageReference Include="Nuke.Components" Version="7.0.2" />
<PackageDownload Include="Yarn.MSBuild" Version="[1.22.19]" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions Directory.Build.props
Expand Up @@ -22,19 +22,19 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.2.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.26">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.70">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
19 changes: 18 additions & 1 deletion FluentAssertions.sln
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32505.426
Expand Down Expand Up @@ -50,6 +49,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP.Specs", "Tests\UWP.Spec
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.Equivalency.Specs", "Tests\FluentAssertions.Equivalency.Specs\FluentAssertions.Equivalency.Specs.csproj", "{A946043D-D3F8-46A4-B485-A88412C417FE}"
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "VB.Specs", "Tests\VB.Specs\VB.Specs.vbproj", "{0C0211B6-D185-4518-A15A-38AC092EDC50}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Specs", "Tests\FSharp.Specs\FSharp.Specs.fsproj", "{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CI|Any CPU = CI|Any CPU
Expand Down Expand Up @@ -134,6 +137,18 @@ Global
{A946043D-D3F8-46A4-B485-A88412C417FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A946043D-D3F8-46A4-B485-A88412C417FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A946043D-D3F8-46A4-B485-A88412C417FE}.Release|Any CPU.Build.0 = Release|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.CI|Any CPU.ActiveCfg = Debug|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.CI|Any CPU.Build.0 = Debug|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C0211B6-D185-4518-A15A-38AC092EDC50}.Release|Any CPU.Build.0 = Release|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.CI|Any CPU.ActiveCfg = Debug|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.CI|Any CPU.Build.0 = Debug|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -152,6 +167,8 @@ Global
{6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3}
{08087654-2C32-4818-95E4-45362373441D} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3}
{A946043D-D3F8-46A4-B485-A88412C417FE} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3}
{0C0211B6-D185-4518-A15A-38AC092EDC50} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3}
{0A69DC62-CA14-44E5-BAF9-2EB2E2E2CADF} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {75DDA3D8-9D6F-4865-93F4-DDE11DEE8290}
Expand Down

0 comments on commit 340af80

Please sign in to comment.