diff --git a/src/Components/Analyzers/src/DiagnosticDescriptors.cs b/src/Components/Analyzers/src/DiagnosticDescriptors.cs index a34102f39b73..e0ecbce05584 100644 --- a/src/Components/Analyzers/src/DiagnosticDescriptors.cs +++ b/src/Components/Analyzers/src/DiagnosticDescriptors.cs @@ -16,7 +16,7 @@ internal static class DiagnosticDescriptors new LocalizableResourceString(nameof(Resources.ComponentParameterSettersShouldBePublic_Title), Resources.ResourceManager, typeof(Resources)), new LocalizableResourceString(nameof(Resources.ComponentParameterSettersShouldBePublic_Format), Resources.ResourceManager, typeof(Resources)), "Encapsulation", - DiagnosticSeverity.Warning, + DiagnosticSeverity.Error, isEnabledByDefault: true, description: new LocalizableResourceString(nameof(Resources.ComponentParameterSettersShouldBePublic_Description), Resources.ResourceManager, typeof(Resources))); @@ -43,7 +43,7 @@ internal static class DiagnosticDescriptors new LocalizableResourceString(nameof(Resources.ComponentParameterShouldBePublic_Title), Resources.ResourceManager, typeof(Resources)), new LocalizableResourceString(nameof(Resources.ComponentParameterShouldBePublic_Format), Resources.ResourceManager, typeof(Resources)), "Encapsulation", - DiagnosticSeverity.Warning, + DiagnosticSeverity.Error, isEnabledByDefault: true, description: new LocalizableResourceString(nameof(Resources.ComponentParametersShouldBePublic_Description), Resources.ResourceManager, typeof(Resources))); diff --git a/src/Components/Analyzers/test/ComponentParameterSettersShouldBePublicTest.cs b/src/Components/Analyzers/test/ComponentParameterSettersShouldBePublicTest.cs index 88b366fd7430..f32bc6048e45 100644 --- a/src/Components/Analyzers/test/ComponentParameterSettersShouldBePublicTest.cs +++ b/src/Components/Analyzers/test/ComponentParameterSettersShouldBePublicTest.cs @@ -78,7 +78,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty1' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 7, 39) @@ -88,7 +88,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty2' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 8, 39) @@ -98,7 +98,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty3' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 9, 39) diff --git a/src/Components/Analyzers/test/ComponentParametersShouldBePublicCodeFixProviderTest.cs b/src/Components/Analyzers/test/ComponentParametersShouldBePublicCodeFixProviderTest.cs index 69a3f2e310c3..2e1ee00be08b 100644 --- a/src/Components/Analyzers/test/ComponentParametersShouldBePublicCodeFixProviderTest.cs +++ b/src/Components/Analyzers/test/ComponentParametersShouldBePublicCodeFixProviderTest.cs @@ -45,7 +45,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParametersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.BadProperty1' should be public.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 8, 40) @@ -85,7 +85,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty1' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 8, 39) @@ -95,7 +95,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty2' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 9, 39) @@ -105,7 +105,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParameterSettersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty3' should have a public setter.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 10, 39) diff --git a/src/Components/Analyzers/test/ComponentParametersShouldBePublicTest.cs b/src/Components/Analyzers/test/ComponentParametersShouldBePublicTest.cs index 2f03b9ea3101..97b01c469948 100644 --- a/src/Components/Analyzers/test/ComponentParametersShouldBePublicTest.cs +++ b/src/Components/Analyzers/test/ComponentParametersShouldBePublicTest.cs @@ -63,7 +63,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParametersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty1' should be public.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 7, 32) @@ -73,7 +73,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParametersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty2' should be public.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 8, 40) @@ -83,7 +83,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParametersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty3' should be public.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 9, 42) @@ -93,7 +93,7 @@ class TypeName { Id = DiagnosticDescriptors.ComponentParametersShouldBePublic.Id, Message = "Component parameter 'ConsoleApplication1.TypeName.MyProperty4' should be public.", - Severity = DiagnosticSeverity.Warning, + Severity = DiagnosticSeverity.Error, Locations = new[] { new DiagnosticResultLocation("Test0.cs", 10, 41)