File tree Expand file tree Collapse file tree
Analyzers/CSharp/Analysis/MakeMemberReadOnly Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- Fix analyzer [ RCS1267] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1267 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1412 ) )
1313- Fix "Unknown value 'Default'" exception ([ PR] ( https://github.com/dotnet/roslynator/pull/1411 ) )
14+ - Fix name of ` UnityEngine.SerializeField ` attribute ([ PR] ( https://github.com/dotnet/roslynator/pull/1419 ) )
1415
1516## [ 4.11.0] - 2024-02-19
1617
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public sealed class MakeMemberReadOnlyAnalyzer : BaseDiagnosticAnalyzer
1818 private static readonly MetadataName Microsoft_AspNetCore_Components_CascadingParameterAttribute = MetadataName . Parse ( "Microsoft.AspNetCore.Components.CascadingParameterAttribute" ) ;
1919 private static readonly MetadataName Microsoft_AspNetCore_Components_InjectAttribute = MetadataName . Parse ( "Microsoft.AspNetCore.Components.InjectAttribute" ) ;
2020 private static readonly MetadataName Newtonsoft_Json_JsonPropertyAttribute = MetadataName . Parse ( "Newtonsoft.Json.JsonPropertyAttribute" ) ;
21- private static readonly MetadataName UnityEngine_SerializeFieldAttribute = MetadataName . Parse ( "UnityEngine.SerializeFieldAttribute " ) ;
21+ private static readonly MetadataName UnityEngine_SerializeField = MetadataName . Parse ( "UnityEngine.SerializeField " ) ;
2222
2323 private static ImmutableArray < DiagnosticDescriptor > _supportedDiagnostics ;
2424
@@ -140,7 +140,7 @@ private static void AnalyzeTypeDeclaration(
140140 && ! fieldSymbol . IsVolatile
141141 && ValidateType ( fieldSymbol . Type )
142142 && ( context . IsUnityCodeAnalysisEnabled ( ) != true
143- || ! fieldSymbol . HasAttribute ( UnityEngine_SerializeFieldAttribute ) ) )
143+ || ! fieldSymbol . HasAttribute ( UnityEngine_SerializeField ) ) )
144144 {
145145 symbols [ fieldSymbol . Name ] = ( declarator , fieldSymbol ) ;
146146 }
Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ class C
393393
394394namespace UnityEngine
395395{
396- class SerializeFieldAttribute : Attribute
396+ class SerializeField : Attribute
397397 {
398398 }
399399}
You can’t perform that action at this time.
0 commit comments