Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Minor formatting fixes to analyzers
  • Loading branch information
Sergio0694 committed Nov 29, 2024
commit 3d2a6a2c1d160544216f645b53acf67c345cd3a7
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using CommunityToolkit.Mvvm.SourceGenerators.Helpers;
using CommunityToolkit.Mvvm.SourceGenerators.Models;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace CommunityToolkit.Mvvm.SourceGenerators;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public override void Initialize(AnalysisContext context)
context.ReportDiagnostic(Diagnostic.Create(
InvalidObservablePropertyDeclarationIsNotIncompletePartialDefinition,
observablePropertyAttribute.GetLocation(),
context.Symbol));
propertySymbol.ContainingType,
propertySymbol.Name));
}
}

Expand All @@ -79,7 +80,8 @@ public override void Initialize(AnalysisContext context)
context.ReportDiagnostic(Diagnostic.Create(
InvalidObservablePropertyDeclarationReturnsByRef,
observablePropertyAttribute.GetLocation(),
context.Symbol));
propertySymbol.ContainingType,
propertySymbol.Name));
}

// Emit an error if the property type is a ref struct
Expand All @@ -88,7 +90,8 @@ public override void Initialize(AnalysisContext context)
context.ReportDiagnostic(Diagnostic.Create(
InvalidObservablePropertyDeclarationReturnsRefLikeType,
observablePropertyAttribute.GetLocation(),
context.Symbol));
propertySymbol.ContainingType,
propertySymbol.Name));
}
}, SymbolKind.Property);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override void Initialize(AnalysisContext context)
InvalidPropertyDeclarationForObservableProperty,
observablePropertyAttribute.GetLocation(),
propertySymbol.ContainingType,
propertySymbol));
propertySymbol.Name));
}
}
}, SymbolKind.Property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override void Initialize(AnalysisContext context)
UnsupportedRoslynVersionForObservablePartialPropertySupport,
propertySymbol.Locations.FirstOrDefault(),
propertySymbol.ContainingType,
propertySymbol));
propertySymbol.Name));
}
}, SymbolKind.Property);
});
Expand Down
Loading