Skip to content

feat: add VOG038 analyzer for uninitialized Value Object properties #1544

feat: add VOG038 analyzer for uninitialized Value Object properties

feat: add VOG038 analyzer for uninitialized Value Object properties #1544

Triggered via pull request May 8, 2026 04:26
Status Failure
Total duration 4m 2s
Artifacts

build.yaml

on: pull_request
Matrix: build
run-snapshots
0s
run-snapshots
Fit to window
Zoom out
Zoom in

Annotations

30 errors and 1 notice
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.NoDiagnostic_when_property_is_inside_a_value_object(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L143
System.InvalidOperationException : Mismatch between number of diagnostics returned, expected "0" actual "5" Diagnostics: // /0/Test0.cs(1,7): error CS0246: The type or namespace name 'Vogen' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(1, 7, 1, 12).WithArguments("Vogen"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObject"), // /0/Test0.cs(4,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(4, 2, 4, 13).WithArguments("ValueObjectAttribute"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObject' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObject"), // /0/Test0.cs(7,2): error CS0246: The type or namespace name 'ValueObjectAttribute' could not be found (are you missing a using directive or an assembly reference?) DiagnosticResult.CompilerError("CS0246").WithSpan(7, 2, 7, 13).WithArguments("ValueObjectAttribute"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial record struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial record class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "readonly partial struct"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
AnalyzerTests.DoNotUseUninitializedValueObjectInPropertyTests.Diagnostic_for_required_missing_init_only_property(voType: "partial class"): tests/AnalyzerTests/DoNotUseUninitializedValueObjectInPropertyTests.cs#L180
System.InvalidOperationException : Expected diagnostic to start at column "17" was actually at column "5" Expected diagnostic: // /0/Test0.cs(9,17,9,33): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 17, 9, 33).WithArguments("MyVo"), Actual diagnostic: // /0/Test0.cs(9,5): warning VOG038: Property of Value Object type 'MyVo' is not nullable, not required, and has no initializer - this may result in an uninitialized Value Object at runtime VerifyCS.Diagnostic().WithSpan(9, 5, 9, 48).WithArguments("MyVo"),
windows-latest
NOTICE: windows-2025 requests are being redirected to windows-2025-vs2026 by May 12, 2026