Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/hooks/coding-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ display="${file##*/}"
# (documentation routinely shows `var` in sample code), an anonymous type (C#
# gives no other spelling), and an occurrence inside a string literal (the
# analyzer suites embed C# fixtures that deliberately use `var`).
# shellcheck disable=SC2317 # reached through the `"rule_${rule}"` dispatch in the run section below
# shellcheck disable=SC2317,SC2329 # reached through the `"rule_${rule}"` dispatch in the run section below
rule_explicit_types() {
awk -v name="$display" '
{
Expand Down Expand Up @@ -94,7 +94,7 @@ rule_explicit_types() {
' "$file"
}

# shellcheck disable=SC2317 # reached through the `"${rule}_hint"` dispatch in the run section below
# shellcheck disable=SC2317,SC2329 # reached through the `"${rule}_hint"` dispatch in the run section below
explicit_types_hint() {
printf '%s' "Coding rule — explicit types (CLAUDE.md, \"Coding rules\"). This file now declares
inferred types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup SDKs (release + floor)
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
# Two SDKs on purpose. 10.0.x is the SDK release.yml packs with, so the pack step below produces
# the exact artifact consumers receive. 8.0.100 (Roslyn 4.8.0 == VS 2022 17.8) is the oldest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
- name: Setup the next .NET preview (best effort)
id: preview
continue-on-error: true
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '11.0.x'
dotnet-quality: preview

# The build SDK. net8.0 is only a target framework; global.json pins the .NET 10 SDK for the build itself.
- name: Setup the build SDK (.NET 10)
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# RUNS net472 assemblies ships on the windows-latest image, and the net472 targeting pack for COMPILATION
# is supplied hermetically by the Microsoft.NETFramework.ReferenceAssemblies package — so no extra install.
- name: Setup .NET (build SDK)
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
# runs normally, and 8.0.x brings the .NET 8 runtime — the floor the tooling ships against — so the run
# step below can execute the net8 binaries on it.
- name: Setup .NET (floor runtime + build SDK)
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: |
8.0.x
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Initialize CodeQL
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
languages: csharp
# Buildless extraction: no .NET SDK or build step is needed, and it sidesteps
Expand All @@ -46,6 +46,6 @@ jobs:
build-mode: none

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
category: "/language:csharp"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Dependency review
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1
with:
# Fail on moderate-or-higher advisories. Only dependency changes introduced by the PR are checked,
# so this is a genuine gate rather than noise; lower to 'low' to be stricter, raise to 'high' to be
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gendoc-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
# The release SDK — the same one release.yml packs with, so this rehearses the real pack path.
dotnet-version: '10.0.x'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
# verify provenance against the Release asset and the nuget.org signature via `dotnet nuget verify`.
# Runs BEFORE both publications on purpose: only attested artifacts are ever released or pushed.
- name: Attest build provenance
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
artifacts/*.nupkg
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
persist-credentials: false

- name: Run Scorecard analysis
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -64,6 +64,6 @@ jobs:
retention-days: 5

- name: Upload SARIF to code-scanning
uses: github/codeql-action/upload-sarif@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'

- name: Setup Java
# The SonarScanner for .NET runs on the JVM; SonarQube Cloud requires Java 17+.
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '17'
Expand Down
18 changes: 9 additions & 9 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@
-->

<ItemGroup>
<PackageVersion Include="AngleSharp" Version="1.8.5" />
<PackageVersion Include="AngleSharp" Version="1.10.4" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="coverlet.MTP" Version="10.1.0" />
<PackageVersion Include="FsCheck" Version="3.5.0" />
<PackageVersion Include="coverlet.MTP" Version="10.1.1" />
<PackageVersion Include="FsCheck" Version="3.6.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageVersion Include="JustDummies" Version="1.0.0-preview.6" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.9.0" />
<PackageVersion Include="JustDummies" Version="1.0.0-rc.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.12.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="5.6.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.12.0" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.3" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="4.1.13" />
<PackageVersion Include="NFluent" Version="3.1.0" />
<PackageVersion Include="NSubstitute" Version="6.2.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.35.0.4138" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.55.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.36.0.15337" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.57.2" />
<PackageVersion Include="Verify.XunitV3" Version="32.0.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
<PackageVersion Include="xunit.v3" Version="4.0.2" />
<PackageVersion Include="xunit.v3" Version="4.0.3" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="4.0.2" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/CatalogDiffCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ internal CatalogDiffCommand(ICatalogSnapshotSource snapshotSource, Func<bool, IG

#endregion

protected override int Execute(CommandContext context, CatalogDiffSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, CatalogDiffSettings settings, CancellationToken cancellationToken) {
// The command body uses no CommandContext state, so it lives in a context-free seam that tests drive directly.
return Run(settings, cancellationToken);
}
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/CatalogUpdateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal CatalogUpdateCommand(ICatalogSnapshotSource snapshotSource, Func<bool,

#endregion

protected override int Execute(CommandContext context, CatalogUpdateSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, CatalogUpdateSettings settings, CancellationToken cancellationToken) {
// The command body uses no CommandContext state, so it lives in a context-free seam that tests drive directly.
return Run(settings, cancellationToken);
}
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/ConfigShowCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace FirstClassErrors.Cli;
/// <summary>Prints the current configuration file, or notes its absence.</summary>
internal sealed class ConfigShowCommand : Command<ConfigScopedSettings> {

protected override int Execute(CommandContext context, ConfigScopedSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, ConfigScopedSettings settings, CancellationToken cancellationToken) {
string path = ConfigurationStore.Resolve(settings.ConfigPath);

if (!ConfigurationStore.Exists(path)) {
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/GenerateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ internal GenerateCommand(IErrorDocumentationGenerator generator, IOutputSink out

#endregion

protected override int Execute(CommandContext context, GenerateSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, GenerateSettings settings, CancellationToken cancellationToken) {
// The command body uses no CommandContext state, so it lives in a context-free seam that tests can drive
// directly (they need only build a GenerateSettings, not a Spectre CommandContext).
return Run(settings, cancellationToken);
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/InitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal sealed class InitSettings : ConfigScopedSettings {
/// </summary>
internal sealed class InitCommand : Command<InitSettings> {

protected override int Execute(CommandContext context, InitSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, InitSettings settings, CancellationToken cancellationToken) {
string path = ConfigurationStore.Resolve(settings.ConfigPath);

if (ConfigurationStore.Exists(path) && !settings.Force) {
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/RendererAddCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal sealed class RendererAddCommand : Command<RendererReferenceSettings> {
Justification =
"The renderer library is validated by loading it from its file path; Assembly.Load resolves by name, " +
"not path. LoadFrom is deliberate — it probes the library's own directory for its dependencies.")]
protected override int Execute(CommandContext context, RendererReferenceSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, RendererReferenceSettings settings, CancellationToken cancellationToken) {
string path = ConfigurationStore.Resolve(settings.ConfigPath);
string configDir = Path.GetDirectoryName(path) ?? Directory.GetCurrentDirectory();
string library = RendererLoader.Resolve(settings.LibraryPath, configDir);
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/RendererListCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal sealed class RendererListCommand : Command<ConfigScopedSettings> {
Justification =
"Each configured library is inspected by loading it from its file path; Assembly.Load resolves by " +
"name, not path. LoadFrom is deliberate — it probes the library's own directory for its dependencies.")]
protected override int Execute(CommandContext context, ConfigScopedSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, ConfigScopedSettings settings, CancellationToken cancellationToken) {
Console.Out.WriteLine("Built-in formats:");
foreach (string format in RendererCatalog.BuiltInFormats) {
Console.Out.WriteLine($" - {format}");
Expand Down
2 changes: 1 addition & 1 deletion FirstClassErrors.Cli/RendererRemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace FirstClassErrors.Cli;
/// </summary>
internal sealed class RendererRemoveCommand : Command<RendererReferenceSettings> {

protected override int Execute(CommandContext context, RendererReferenceSettings settings, CancellationToken cancellationToken) {
public override int Execute(CommandContext context, RendererReferenceSettings settings, CancellationToken cancellationToken) {
string path = ConfigurationStore.Resolve(settings.ConfigPath);

if (!ConfigurationStore.Exists(path)) {
Expand Down