diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index d1ab77e6..fbf1e546 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -11,15 +11,16 @@ on:
jobs:
build:
+ permissions:
+ checks: write
+ pull-requests: write
runs-on: windows-latest
steps:
- - name: Configure Git to allow long paths
- run: git config --system core.longpaths true
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Setup .NET
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
@@ -27,8 +28,13 @@ jobs:
- name: Build
run: dotnet build --no-restore
- name: Test
- run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage"
+ run: dotnet test --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ - name: Publish Test Results
+ uses: EnricoMi/publish-unit-test-result-action/windows@v2
+ if: always()
+ with:
+ files: ${{ github.workspace }}/**/*.trx
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 739839ee..cf5c1dec 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,26 +5,26 @@
-
+
-
+
-
-
+
+
-
+
-
+
@@ -33,10 +33,10 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/SpreadCheetah.Benchmark/SpreadCheetah.Benchmark.csproj b/SpreadCheetah.Benchmark/SpreadCheetah.Benchmark.csproj
index 6e2e1753..9a71f2e7 100644
--- a/SpreadCheetah.Benchmark/SpreadCheetah.Benchmark.csproj
+++ b/SpreadCheetah.Benchmark/SpreadCheetah.Benchmark.csproj
@@ -3,6 +3,7 @@
Exe
net48;net6.0;net7.0;net8.0
+ AnyCPU
diff --git a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellStyle_ClassWithEmptyCellStyle.verified.txt b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellStyle_ClassWithEmptyCellStyle.verified.txt
index 0059bfc0..164f58f3 100644
--- a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellStyle_ClassWithEmptyCellStyle.verified.txt
+++ b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellStyle_ClassWithEmptyCellStyle.verified.txt
@@ -1,14 +1,17 @@
{
Diagnostics: [
{
- Id: SPCH1006,
- Title: Invalid attribute argument,
- Severity: Error,
- WarningLevel: 0,
Location: : (6,5)-(6,18),
- MessageFormat: '{0}' is an invalid argument for {1},
Message: '' is an invalid argument for CellStyleAttribute,
- Category: SpreadCheetah.SourceGenerator
+ Severity: Error,
+ Descriptor: {
+ Id: SPCH1006,
+ Title: Invalid attribute argument,
+ MessageFormat: '{0}' is an invalid argument for {1},
+ Category: SpreadCheetah.SourceGenerator,
+ DefaultSeverity: Error,
+ IsEnabledByDefault: true
+ }
}
]
}
\ No newline at end of file
diff --git a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassPropertyWithConverterAndCellValueTruncate.verified.txt b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassPropertyWithConverterAndCellValueTruncate.verified.txt
index 5e0db993..f10419a6 100644
--- a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassPropertyWithConverterAndCellValueTruncate.verified.txt
+++ b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassPropertyWithConverterAndCellValueTruncate.verified.txt
@@ -1,14 +1,17 @@
{
Diagnostics: [
{
- Id: SPCH1008,
- Title: Attribute combination not supported,
- Severity: Error,
- WarningLevel: 0,
Location: : (7,19)-(7,27),
- MessageFormat: Having both the {0} and the {1} attributes on a property is not supported,
Message: Having both the CellValueConverter and the CellValueTruncate attributes on a property is not supported,
- Category: SpreadCheetah.SourceGenerator
+ Severity: Error,
+ Descriptor: {
+ Id: SPCH1008,
+ Title: Attribute combination not supported,
+ MessageFormat: Having both the {0} and the {1} attributes on a property is not supported,
+ Category: SpreadCheetah.SourceGenerator,
+ DefaultSeverity: Error,
+ IsEnabledByDefault: true
+ }
}
]
}
\ No newline at end of file
diff --git a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithConverterThatDoesNotInheritCellValueConverter.verified.txt b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithConverterThatDoesNotInheritCellValueConverter.verified.txt
index 7756c10c..82c21879 100644
--- a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithConverterThatDoesNotInheritCellValueConverter.verified.txt
+++ b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithConverterThatDoesNotInheritCellValueConverter.verified.txt
@@ -1,14 +1,17 @@
{
Diagnostics: [
{
- Id: SPCH1007,
- Title: Invalid attribute type argument,
- Severity: Error,
- WarningLevel: 0,
Location: : (5,5)-(5,54),
- MessageFormat: Type '{0}' is an invalid argument for {1} because it does not inherit {2},
Message: Type 'MyNamespace.DecimalValueConverter' is an invalid argument for CellValueConverterAttribute because it does not inherit CellValueConverter,
- Category: SpreadCheetah.SourceGenerator
+ Severity: Error,
+ Descriptor: {
+ Id: SPCH1007,
+ Title: Invalid attribute type argument,
+ MessageFormat: Type '{0}' is an invalid argument for {1} because it does not inherit {2},
+ Category: SpreadCheetah.SourceGenerator,
+ DefaultSeverity: Error,
+ IsEnabledByDefault: true
+ }
}
]
}
\ No newline at end of file
diff --git a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverter.verified.txt b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverter.verified.txt
index b8648df4..20ec0df3 100644
--- a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverter.verified.txt
+++ b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverter.verified.txt
@@ -1,14 +1,17 @@
{
Diagnostics: [
{
- Id: SPCH1007,
- Title: Invalid attribute type argument,
- Severity: Error,
- WarningLevel: 0,
Location: : (5,5)-(5,54),
- MessageFormat: Type '{0}' is an invalid argument for {1} because it does not inherit {2},
Message: Type 'MyNamespace.DecimalValueConverter' is an invalid argument for CellValueConverterAttribute because it does not inherit CellValueConverter,
- Category: SpreadCheetah.SourceGenerator
+ Severity: Error,
+ Descriptor: {
+ Id: SPCH1007,
+ Title: Invalid attribute type argument,
+ MessageFormat: Type '{0}' is an invalid argument for {1} because it does not inherit {2},
+ Category: SpreadCheetah.SourceGenerator,
+ DefaultSeverity: Error,
+ IsEnabledByDefault: true
+ }
}
]
}
\ No newline at end of file
diff --git a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverterOnComplexProperty.verified.txt b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverterOnComplexProperty.verified.txt
index ef20103e..b01ad937 100644
--- a/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverterOnComplexProperty.verified.txt
+++ b/SpreadCheetah.SourceGenerator.SnapshotTest/Snapshots/G.CellValueConverter_ClassWithInvalidConverterOnComplexProperty.verified.txt
@@ -1,24 +1,31 @@
{
Diagnostics: [
{
- Id: SPCH1007,
- Title: Invalid attribute type argument,
- Severity: Error,
- WarningLevel: 0,
Location: : (5,5)-(5,48),
- MessageFormat: Type '{0}' is an invalid argument for {1} because it does not inherit {2},
Message: Type 'MyNamespace.StringConverter' is an invalid argument for CellValueConverterAttribute because it does not inherit CellValueConverter