Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rollForward": false
},
"purview.build": {
"version": "0.5.4",
"version": "0.7.1",
"commands": [
"purview-build"
],
Expand Down
4 changes: 2 additions & 2 deletions .config/purview-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"Solution": "src/Results.slnx",
"TestRoot": "src/tests",
"TestPatterns": "*Tests.csproj",
"TestProjects": "*UnitTests*",
"TestFilter": "/*/*/*/*[Category=Unit]"
"TestProjects": "*Tests*",
"TestFilter": "/*/*/*/*"
},
"PackValidation": {
// Explicit because Purview.Build 0.5.3 defaults RequiredCompilerFlags to empty. Earlier
Expand Down
26 changes: 21 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Purview.BuildSdk 1.1.0 - managed file, do not edit
#
# This file is written by Purview.BuildSdk and is replaced whenever the SDK version changes. The version
# on the first line is how the SDK recognises a file it owns: a .editorconfig without that marker is
# yours, and is never touched.
#
# To add your own rules, create a second .editorconfig in a subdirectory - `src/.editorconfig` is the
# usual choice - without `root = true`. EditorConfig applies the nearest file last, so your settings win
# over these, and nothing you write is lost when this file is updated.
#
# To stop the SDK updating this file, set one of:
# <PurviewEditorConfigAutoUpdate>false</PurviewEditorConfigAutoUpdate> keep this file as it is
# <PurviewRepoBootstrapMode>Never</PurviewRepoBootstrapMode> opt out of all bootstrapping
# <BootstrapEditorConfigToRepoRoot>false</BootstrapEditorConfigToRepoRoot>
#
# Deleting the first line also works: without the marker the SDK treats the file as yours. You then own
# every rule in it, including the ones a future SDK version would have fixed.
#
# See https://github.com/purview-dev/build-sdk#editorconfig for the full description.

root = true

# Base Configuration - General Settings, File Formatting, and Naming Conventions
Expand Down Expand Up @@ -360,12 +380,8 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:warning
# Code-block preferences
csharp_prefer_braces = when_multiline:suggestion
csharp_prefer_simple_using_statement = false:silent
csharp_prefer_system_threading_lock = true
dotnet_style_prefer_collection_expression = true:suggestion

# Enable foreach explicit cast preference
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:warning

# Prefer System.Threading.Lock
csharp_prefer_system_threading_lock = true:warning

Expand Down Expand Up @@ -497,7 +513,7 @@ dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_simplified_boolean_expressions = false:silent
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches: [main]

permissions:
contents: write
# The shared release workflow pushes the same packages to nuget.org and, when
# PURVIEW_PUBLISH_GITHUB_PACKAGES=true, to GitHub Packages. A reusable workflow cannot grant
# more than its caller, so the permission is declared here.
packages: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
15 changes: 5 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project>
<PropertyGroup>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<!-- Version Definitions -->
<PropertyGroup Label=".NET Versions">
<!--
Expand All @@ -14,18 +11,16 @@
<DotNetRuntimeVersion Condition="'$(TargetFramework)' == 'net10.0'">10.0.13</DotNetRuntimeVersion>
</PropertyGroup>
<PropertyGroup Label="Purview Versions">
<PurviewZodSharpVersion>2.1.0</PurviewZodSharpVersion>
<PurviewValueObjectsVersion>1.1.0</PurviewValueObjectsVersion>
<PurviewZodSharpVersion>2.3.0</PurviewZodSharpVersion>
<PurviewValueObjectsVersion>1.2.0</PurviewValueObjectsVersion>
</PropertyGroup>
<PropertyGroup Label="Source Generator Versions">
<PurviewSourceGeneratorFrameworkVersion>1.1.1</PurviewSourceGeneratorFrameworkVersion>
<PurviewSourceGeneratorFrameworkVersion>1.2.0</PurviewSourceGeneratorFrameworkVersion>
<RoslynVersion>5.9.0</RoslynVersion>
</PropertyGroup>
<PropertyGroup Label="Testing Versions">
<!-- Purview.Skills.Testing 1.0.6 depends on TUnit.Assertions/TUnit.Core 1.75.0, and central
transitive pinning would otherwise pin TUnit.Core back down to a lower version. -->
<TUnitVersion>1.75.0</TUnitVersion>
<PurviewSkillsTestingVersion>1.0.6</PurviewSkillsTestingVersion>
<TUnitVersion>1.76.0</TUnitVersion>
<PurviewSkillsTestingVersion>1.1.0</PurviewSkillsTestingVersion>
</PropertyGroup>
<!-- Packages -->
<ItemGroup Label="Purview">
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"allowPrerelease": true
},
"msbuild-sdks": {
"Purview.BuildSdk": "1.0.6"
"Purview.BuildSdk": "1.1.0"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "results",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"private": true,
"keywords": [],
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Repository.UnitTests/SkillTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Purview.Skills.Testing;

namespace Purview.Results;
namespace Purview.Results.Repository;

/// <summary>
/// Runs the Agent Skills conformance rule set against this repository's authored skills in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CancellationToken cancellationToken
{
// Act — the generator must report or skip, never crash. A crash takes every other union in the
// compilation down with it.
var result = await GenerateAsync(ArrayCaseSource, cancellationToken);
using var result = await GenerateAsync(ArrayCaseSource, cancellationToken);

// Assert
await Assert.That(result).IsNotNull();
Expand All @@ -46,7 +46,7 @@ CancellationToken cancellationToken
)
{
// Act
var result = await GenerateAsync(ArrayCaseSource, cancellationToken);
using var result = await GenerateAsync(ArrayCaseSource, cancellationToken);

// Assert — the named case is unaffected by the unusable one.
var generated = result.AssertSingleGeneratedSource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CancellationToken cancellationToken
foreach (var target in targets)
{
// Act
var result = await GenerateAsync($"namespace Test {{ {target} }}", cancellationToken);
using var result = await GenerateAsync($"namespace Test {{ {target} }}", cancellationToken);

// Assert
// The analyzer reports RSG1000; the generator blocks generation and reports nothing itself.
Expand All @@ -56,7 +56,7 @@ namespace Test
""";

// Act
var result = await GenerateAsync(source, cancellationToken);
using var result = await GenerateAsync(source, cancellationToken);

// Assert
await Assert.That(result).HasNoDiagnostics();
Expand All @@ -78,7 +78,7 @@ namespace Test
""";

// Act
var result = await GenerateAsync(
using var result = await GenerateAsync(
source,
new ResultsSourceGeneratorTestOptions { ThrowOnGenerationException = false },
cancellationToken
Expand Down Expand Up @@ -108,7 +108,7 @@ namespace Test
""";

// Act
var result = await GenerateAsync(source, cancellationToken);
using var result = await GenerateAsync(source, cancellationToken);

// Assert
// RSG1003 is a case-scope finding reported by the analyzer, and generation continues for the
Expand Down Expand Up @@ -144,7 +144,7 @@ namespace Test
""";

// Act
var result = await GenerateAsync(
using var result = await GenerateAsync(
[first, second],
new ResultsSourceGeneratorTestOptions { ThrowOnGenerationException = false },
cancellationToken
Expand Down Expand Up @@ -178,7 +178,7 @@ namespace Test
""";

// Act
var result = await GenerateAsync(source, cancellationToken);
using var result = await GenerateAsync(source, cancellationToken);

// Assert
// RSG1006 needs every opted-in union, so the generator reports it; it is non-blocking and only the
Expand Down Expand Up @@ -233,7 +233,7 @@ public static class Outer
""";

// Act
var result = await GenerateAsync(source, cancellationToken);
using var result = await GenerateAsync(source, cancellationToken);

// Assert
await Assert.That(result).HasDiagnostic("RSG1005");
Expand All @@ -258,7 +258,7 @@ public sealed class NotAUnion;
""";

// Act
var result = await GenerateAsync(
using var result = await GenerateAsync(
source,
new ResultsSourceGeneratorTestOptions
{
Expand Down
Loading
Loading