Commit Graph

261 Commits

Author SHA1 Message Date
Sergio Pedri 12877c2a45 Bump version to 8.2.1 2023-05-10 14:03:29 +02:00
Sergio Pedri 77c7ef2b15 Update NuGet packages to latest stable 2023-05-08 12:46:49 +02:00
Sergio Pedri 40c82ce907 Add one more generator test for enum values 2023-05-04 16:07:05 +02:00
Sergio Pedri 374219554b Fix forwarding attributes with negative enum values 2023-05-04 15:48:04 +02:00
Sergio Pedri 46b52b49df Add unit tests for slicing a 2D memory from manager 2023-04-27 17:22:48 +02:00
Sergio Pedri 873c1c3613 Add unit tests for XML docs on generated property change args 2023-03-25 18:47:22 +01:00
Sergio Pedri 2e7634829d Preserve /// <inheritdoc/> in top level types, add unit test 2023-03-25 18:19:37 +01:00
Sergio Pedri 3b2d287d28 Add /// <inheritdoc/> to generated type hierarchies 2023-03-25 18:11:07 +01:00
Sergio Pedri 673801af53 Update generator for unconstrained generic nullability 2023-03-14 18:34:27 +01:00
Sergio Pedri d2fe8a0eb0 Add unit tests for [MemberNotNull] generation 2023-03-14 14:07:59 +01:00
Gabriele Messina 551921d2dc Add open generics support in ToTypeString
Fix TypeExtensions ToTypeString method throws if invoked on a generic class without specify the generic type
2023-03-12 20:30:38 +01:00
Sergio Pedri 1537e98edb Bump NuGet packages to latest stable 2023-03-10 01:47:17 +01:00
Sergio Pedri 7c3c8c56fb Bump version to 8.2.0 2023-03-09 21:16:11 +01:00
Sergio Pedri 66f582bd94 Fix [RelayCommand] attribute over methods with no attributes 2023-03-09 20:25:50 +01:00
Sergio Pedri 9297335238 Fix partial methods support with Roslyn 4.0
Also ensure a consistent order for forwarded attributes
2023-03-09 15:38:16 +01:00
Sergio Pedri a845ad4b16 Fix attributes gathering from partial command methods 2023-03-09 14:13:34 +01:00
Sergio Pedri 30c4ad472c Support partial [RelayCommand] methods 2023-03-09 13:53:42 +01:00
Sergio Pedri fd7fa69538 Add unit tests for forwarded [RelayCommand] attributes 2023-03-08 20:19:39 +01:00
Sergio Pedri 0ec2c25f7a Add ArrayPoolBufferWriter<T>.DangerousGetArray() 2023-02-20 13:11:38 +01:00
Sergio Pedri 0ea77c3aae Add codegen test for filename hints on Roslyn 4.0.1 2023-02-14 13:49:29 +01:00
Sergio Pedri b4b2227bd9 Fix forwarded double attribute parameters 2023-02-10 19:01:23 +01:00
Sergio Pedri 845503d7f7 Add codegen test for new partial property hooks 2023-02-01 00:07:45 +01:00
Sergio Pedri 7f4c8800aa Add functional tests for new generated methods 2023-02-01 00:07:45 +01:00
Sergio Pedri 3b2226bb29 Add draft of ClassUsingAttributeInsteadOfInheritanceCodeFixer tests 2023-01-26 22:55:02 +01:00
Sergio Pedri 96f3fad50a Merge pull request #581 from CommunityToolkit/dev/no-symbols-in-ivp
Move two more diagnostics to analyzers
2023-01-26 09:32:04 -08:00
Sergio Pedri e7a79c3c5b Rename code fixer project to CommunityToolkit.Mvvm.CodeFixers 2023-01-23 16:53:47 +01:00
Sergio Pedri 1be2fa125d Pack code fixer project in the MVVM Toolkit package 2023-01-23 01:07:22 +01:00
Sergio Pedri 6ee8d7cff7 Update code style to follow repo conventions 2023-01-23 00:49:14 +01:00
Fredric Silberberg 78d37ab700 Use specific reference assemblies to resolve test errors, mark fixer shared. 2023-01-22 15:11:53 -08:00
Sergio Pedri b7f121c2ef Update unit tests for the two new analyzers 2023-01-22 21:34:37 +01:00
Fredric Silberberg 441abbbdbc Add fixers project and implement a fixer for FieldReferenceForObservablePropertyFieldAnalyzer
This adds a fixer for MVVMTK0034, that simply swaps the field reference for what will be generated for the property. It leaves the qualification intact, basically just doing a text swap. Because it's very a very simple fixer, the built-in batch fixall provider works just fine and does not need special handling.

While I implemented the fixer and added some tests, I did not actually set up all the msbuild goop for properly packaging this as part of the existing packages (as, frankly, the multi-targeting and msbuild setup in this repo is very complicated and I didn't feel like trying to grok exactly how to add it given the setup). The fixer assembly needs to be put next to the analyzer assemblies. This PR will be editable by maintainers, so feel free to implement this in-place in the PR itself.

Fixes https://github.com/CommunityToolkit/dotnet/issues/577.
2023-01-21 23:16:11 -08:00
Sergio Pedri 9eb3a05d85 Add unit tests for new attribute diagnostics 2023-01-16 13:21:39 +01:00
Sergio Pedri 8794cce676 Add unit test for [ObservableProperty] on _UpperCamel field 2023-01-01 18:34:11 +01:00
Sergio Pedri bc740416e2 Update NuGet packages to latest stable releases 2022-12-22 14:13:30 +01:00
Sergio Pedri 5802e2f90b Stop generating polyfills for nullability attributes 2022-12-19 20:31:23 +01:00
Sergio Pedri 1953935bbb Skip field reference diagnostics from constructors 2022-12-14 16:52:19 +01:00
Sergio Pedri cf451e8ac2 Fix exception type from Stream.Read extension 2022-12-13 16:22:22 +01:00
Sergio Pedri 35e358459b Add unit tests for new analyzer 2022-12-12 21:35:56 +01:00
Sergio Pedri 526ed1d6da Suppress warnings from analyzers in unit tests 2022-12-12 21:35:56 +01:00
Sergio Pedri aa4ff300c4 Merge pull request #531 from CommunityToolkit/dev/base-attribute-analyzer
Add analyzer for incorrect [INotifyPropertyChanged] and [ObservableObject] use
2022-12-12 12:35:08 -08:00
Sergio Pedri e3980a73f3 Add unit tests for new analyzer 2022-12-12 20:16:33 +01:00
Sergio Pedri 88a56f493f Suppress warnings from analyzers in unit tests 2022-12-12 20:16:33 +01:00
Sergio Pedri a7cfaa23ad Merge pull request #519 from CommunityToolkit/dev/ref-fields-memory
Use ref fields on .NET 7 for all span-like types
2022-12-12 07:06:40 -08:00
Sergio Pedri 7eef9f293e Add unit tests for buffered StreamExtensions.Read<T> 2022-12-07 16:57:22 +01:00
Sergio Pedri 83dd209f5f Fix mutability of ReadOnlySpan2D<T>.GetPinnableReference() 2022-12-07 13:20:54 +01:00
Sergio Pedri d105721bb2 Replace Unsafe.NullRef<T>() with ref *(T*)null 2022-11-23 16:38:04 +01:00
Sergio Pedri 3bbfe6c75e Replace Unsafe.SizeOf<T>() with sizeof(T) 2022-11-23 02:52:02 +01:00
Sergio Pedri 1f60a7bd4e Move all source files into src\ subfolder 2022-11-21 17:25:07 +01:00
Sergio Pedri ffb818aa15 Switch .NET Core 3.1 TFM in tests to .NET 7 2022-11-16 01:48:01 +01:00
Sergio Pedri 8730e39067 Bump NuGet packages to latest stable versions 2022-11-15 19:47:43 +01:00