Skip to content

Commit a76db90

Browse files
authored
Update Shipped mark down to include descriptions (#95)
* Update Shipped mark down to include descriptions Add to Documentation * Update URL for analyzer descriptors
1 parent 5a7dce6 commit a76db90

File tree

4 files changed

+92
-41
lines changed

4 files changed

+92
-41
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ These Source Generators were designed to work in full with ReactiveUI V19.5.31 a
1010
- [ReactiveCommand][property: AttribueToAddToCommand] with Attribute passthrough
1111
- [IViewFor(nameof(ViewModelName))]
1212

13-
Versions older than V19.5.31 to this:
14-
- [Reactive] fully supported,
15-
- [ObservableAsProperty] fully supported,
13+
Versions older than V19.5.31 to this:
1614
- [ReactiveCommand] all options supported except Cancellation Token asnyc methods.
1715

16+
[analyzer codes](https://github.com/reactiveui/ReactiveUI.SourceGenerators/blob/main/src/ReactiveUI.SourceGenerators/AnalyzerReleases.Shipped.md)
17+
1818
# Historical ways
1919
## Read-write properties
2020
Typically properties are declared like this:
Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,78 @@
1-
; Shipped analyzer releases
2-
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
1+
## Rules
2+
Shipped in ReactiveUI.SourceGenerators
3+
4+
### RXUISG0001 - Unsupported C# Language Version
5+
This rule checks if the project is using an unsupported C# language version. The supported versions are C# 7.3 and above. If the project is using an unsupported version, the rule will raise an error.
6+
7+
### RXUISG0002 - ReactiveCommandGenerator
8+
This rule checks if the `ReactiveCommand` has a Invalid ReactiveCommand method signature.
9+
10+
### RXUISG0003 - ReactiveCommandGenerator
11+
This rule checks if the `ReactiveCommand` has a Invalid ReactiveCommand.CanExecute member name.
12+
13+
### RXUISG0004 - ReactiveCommandGenerator
14+
This rule checks if the `ReactiveCommand` has Multiple ReactiveCommand.CanExecute member name matches.
15+
16+
### RXUISG0005 - ReactiveCommandGenerator
17+
This rule checks if the `ReactiveCommand` has No valid ReactiveCommand.CanExecute member match.
18+
19+
### RXUISG0006 - ReactiveCommandGenerator
20+
This rule checks if the `ReactiveCommand` has Invalid field or property targeted attribute type.
21+
22+
### RXUISG0007 - ReactiveCommandGenerator
23+
This rule checks if the `ReactiveCommand` has Invalid field or property targeted attribute expression.
24+
25+
### RXUISG0008 - AsyncVoidReturningReactiveCommandMethodAnalyzer
26+
This rule checks if the `ReactiveCommand` has Async void returning method annotated with ReactiveCommand.
27+
28+
### RXUISG0009 - ReactiveGenerator
29+
This rule checks if the `Reactive` has Name collision for generated property.
30+
31+
### RXUISG0010 - ReactiveGenerator
32+
This rule checks if the `Reactive` has Invalid property targeted attribute type.
33+
34+
### RXUISG0011 - ReactiveGenerator
35+
This rule checks if the `Reactive` has Invalid property targeted attribute expression.
36+
37+
### RXUISG0012 - ObservableAsPropertyGenerator
38+
This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute type.
39+
40+
### RXUISG0013 - ObservableAsPropertyGenerator
41+
This rule checks if the `ObservableAsProperty` has Invalid property targeted attribute expression.
42+
43+
### RXUISG0014 - ObservableAsPropertyGenerator
44+
This rule checks if the `ObservableAsProperty` has Invalid generated property declaration.
45+
46+
### RXUISG0015 - ReactiveGenerator
47+
This rule checks if the `Reactive` attribute is being used correctly. If the `Reactive` has Invalid generated property declaration.
48+
49+
### RXUISG0016 - PropertyToReactiveFieldCodeFixProvider
50+
This rule checks if there are any Properties to change to Reactive Field, change to [Reactive] private type _fieldName;.
51+
52+
### RXUISG0017 - ObservableAsPropertyFromObservableGenerator
53+
This rule checks if the `ObservableAsProperty` has Invalid generated property declaration.
54+
355

456
## Release 1.0
557

658
### New Rules
759

860
Rule ID | Category | Severity | Notes
961
--------|----------|----------|-------
10-
RXUISG0001 | ReactiveUI.SourceGenerators.UnsupportedCSharpLanguageVersionAnalyzer | Error | See https://www.reactiveui.net/errors/RXUISG0001
11-
RXUISG0002 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0002
12-
RXUISG0003 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0003
13-
RXUISG0004 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0004
14-
RXUISG0005 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0005
15-
RXUISG0006 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0006
16-
RXUISG0007 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0007
17-
RXUISG0008 | ReactiveUI.SourceGenerators.AsyncVoidReturningReactiveCommandMethodAnalyzer | Error | See https://www.reactiveui.net/errors/RXUISG0008
18-
RXUISG0009 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0009
19-
RXUISG0010 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0010
20-
RXUISG0011 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0011
21-
RXUISG0012 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0012
22-
RXUISG0013 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0013
23-
RXUISG0014 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0014
24-
RXUISG0015 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0015
25-
RXUISG0016 | ReactiveUI.SourceGenerators.PropertyToReactiveFieldCodeFixProvider | Info | See https://www.reactiveui.net/errors/RXUISG0016
26-
RXUISG0017 | ReactiveUI.SourceGenerators.ObservableAsPropertyFromObservableGenerator | Error | See https://www.reactiveui.net/errors/RXUISG0017
62+
RXUISG0001 | ReactiveUI.SourceGenerators.UnsupportedCSharpLanguageVersionAnalyzer | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
63+
RXUISG0002 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
64+
RXUISG0003 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
65+
RXUISG0004 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
66+
RXUISG0005 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
67+
RXUISG0006 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
68+
RXUISG0007 | ReactiveUI.SourceGenerators.ReactiveCommandGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
69+
RXUISG0008 | ReactiveUI.SourceGenerators.AsyncVoidReturningReactiveCommandMethodAnalyzer | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
70+
RXUISG0009 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
71+
RXUISG0010 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
72+
RXUISG0011 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
73+
RXUISG0012 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
74+
RXUISG0013 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
75+
RXUISG0014 | ReactiveUI.SourceGenerators.ObservableAsPropertyGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
76+
RXUISG0015 | ReactiveUI.SourceGenerators.ReactiveGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
77+
RXUISG0016 | ReactiveUI.SourceGenerators.PropertyToReactiveFieldCodeFixProvider | Info | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
78+
RXUISG0017 | ReactiveUI.SourceGenerators.ObservableAsPropertyFromObservableGenerator | Error | See https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
; Unshipped analyzer release
2-
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
1+
[Unshipped analyzer release](https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md)

src/ReactiveUI.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal static class DiagnosticDescriptors
2626
defaultSeverity: DiagnosticSeverity.Error,
2727
isEnabledByDefault: true,
2828
description: "The source generator features from ReactiveUI require consuming projects to set the C# language version to at least C# 9.0. Make sure to add <LangVersion>9.0</LangVersion> (or above) to your .csproj file.",
29-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0001");
29+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
3030

3131
/// <summary>
3232
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when an annotated method to generate a command for has an invalid signature.
@@ -42,7 +42,7 @@ internal static class DiagnosticDescriptors
4242
defaultSeverity: DiagnosticSeverity.Error,
4343
isEnabledByDefault: true,
4444
description: "Cannot apply [ReactiveCommand] to methods with a signature that doesn't match any of the existing reactive command types.",
45-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0002");
45+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
4646

4747
/// <summary>
4848
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a specified <c>CanExecute</c> name has no matching member.
@@ -58,7 +58,7 @@ internal static class DiagnosticDescriptors
5858
defaultSeverity: DiagnosticSeverity.Error,
5959
isEnabledByDefault: true,
6060
description: "The CanExecute name in [ReactiveCommand] must refer to a valid member in its parent type.",
61-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0003");
61+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
6262

6363
/// <summary>
6464
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a specified <c>CanExecute</c> name maps to multiple members.
@@ -74,7 +74,7 @@ internal static class DiagnosticDescriptors
7474
defaultSeverity: DiagnosticSeverity.Error,
7575
isEnabledByDefault: true,
7676
description: "Cannot set the CanExecute name in [ReactiveCommand] to one that has multiple matches in its parent type (it must refer to a single compatible member).",
77-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0004");
77+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
7878

7979
/// <summary>
8080
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a a specified <c>CanExecute</c> name maps to an invalid member.
@@ -90,7 +90,7 @@ internal static class DiagnosticDescriptors
9090
defaultSeverity: DiagnosticSeverity.Error,
9191
isEnabledByDefault: true,
9292
description: "The CanExecute name in [ReactiveCommand] must refer to a compatible member (either a property or a method) to be used in a generated command.",
93-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0005");
93+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
9494

9595
/// <summary>
9696
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a method with <c>[ReactiveCommand]</c> is using an invalid attribute targeting the field or property.
@@ -106,7 +106,7 @@ internal static class DiagnosticDescriptors
106106
defaultSeverity: DiagnosticSeverity.Error,
107107
isEnabledByDefault: true,
108108
description: "All attributes targeting the generated field or property for a method annotated with [ReactiveCommand] must correctly be resolved to valid types.",
109-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0006");
109+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
110110

111111
/// <summary>
112112
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a method with <c>[ReactiveCommand]</c> is using an invalid attribute targeting the field or property.
@@ -122,7 +122,7 @@ internal static class DiagnosticDescriptors
122122
defaultSeverity: DiagnosticSeverity.Error,
123123
isEnabledByDefault: true,
124124
description: "All attributes targeting the generated field or property for a method annotated with [ReactiveCommand] must be using valid expressions.",
125-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0007");
125+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
126126

127127
/// <summary>
128128
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a method with <c>[ReactiveCommand]</c> is async void.
@@ -138,7 +138,7 @@ internal static class DiagnosticDescriptors
138138
defaultSeverity: DiagnosticSeverity.Error,
139139
isEnabledByDefault: true,
140140
description: "All asynchronous methods annotated with [ReactiveCommand] should return a Task type, to benefit from the additional support provided by ReactiveCommand.FromTask.",
141-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0008");
141+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
142142

143143
/// <summary>
144144
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a generated property created with <c>[Reactive]</c> would collide with the source field.
@@ -154,7 +154,7 @@ internal static class DiagnosticDescriptors
154154
defaultSeverity: DiagnosticSeverity.Error,
155155
isEnabledByDefault: true,
156156
description: "The name of fields annotated with [Reactive] should use \"lowerCamel\", \"_lowerCamel\" or \"m_lowerCamel\" pattern to avoid collisions with the generated properties.",
157-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0009");
157+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
158158

159159
/// <summary>
160160
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a field with <c>[Reactive]</c> is using an invalid attribute targeting the property.
@@ -170,7 +170,7 @@ internal static class DiagnosticDescriptors
170170
defaultSeverity: DiagnosticSeverity.Error,
171171
isEnabledByDefault: true,
172172
description: "All attributes targeting the generated property for a field annotated with [Reactive] must correctly be resolved to valid types.",
173-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0010");
173+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
174174

175175
/// <summary>
176176
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a field with <c>[Reactive]</c> is using an invalid attribute expression targeting the property.
@@ -186,7 +186,7 @@ internal static class DiagnosticDescriptors
186186
defaultSeverity: DiagnosticSeverity.Error,
187187
isEnabledByDefault: true,
188188
description: "All attributes targeting the generated property for a field annotated with [Reactive] must be using valid expressions.",
189-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0011");
189+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
190190

191191
/// <summary>
192192
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a field with <c>[ObservableAsProperty]</c> is using an invalid attribute targeting the property.
@@ -202,7 +202,7 @@ internal static class DiagnosticDescriptors
202202
defaultSeverity: DiagnosticSeverity.Error,
203203
isEnabledByDefault: true,
204204
description: "All attributes targeting the generated property for a field annotated with [ObservableAsProperty] must correctly be resolved to valid types.",
205-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0012");
205+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
206206

207207
/// <summary>
208208
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a field with <c>[ObservableAsProperty]</c> is using an invalid attribute expression targeting the property.
@@ -218,7 +218,7 @@ internal static class DiagnosticDescriptors
218218
defaultSeverity: DiagnosticSeverity.Error,
219219
isEnabledByDefault: true,
220220
description: "All attributes targeting the generated property for a field annotated with [ObservableAsProperty] must be using valid expressions.",
221-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0013");
221+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
222222

223223
/// <summary>
224224
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a generated property created with <c>[ObservableAsProperty]</c> would cause conflicts with other generated members.
@@ -234,7 +234,7 @@ internal static class DiagnosticDescriptors
234234
defaultSeverity: DiagnosticSeverity.Error,
235235
isEnabledByDefault: true,
236236
description: "The fields annotated with [ObservableAsProperty] cannot result in a property name or have a type that would cause conflicts with other generated members.",
237-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0014");
237+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
238238

239239
/// <summary>
240240
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when a generated property created with <c>[Reactive]</c> would cause conflicts with other generated members.
@@ -250,7 +250,7 @@ internal static class DiagnosticDescriptors
250250
defaultSeverity: DiagnosticSeverity.Error,
251251
isEnabledByDefault: true,
252252
description: "The fields annotated with [Reactive] cannot result in a property name or have a type that would cause conflicts with other generated members.",
253-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0015");
253+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
254254

255255
/// <summary>
256256
/// The property to field rule.
@@ -263,7 +263,7 @@ internal static class DiagnosticDescriptors
263263
defaultSeverity: DiagnosticSeverity.Info,
264264
isEnabledByDefault: true,
265265
description: "Used to create a Read Write INPC Reactive Property for ReactiveUI, annotated with [Reactive].",
266-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0016");
266+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
267267

268268
/// <summary>
269269
/// The observable as property method has parameters error.
@@ -276,5 +276,5 @@ internal static class DiagnosticDescriptors
276276
defaultSeverity: DiagnosticSeverity.Error,
277277
isEnabledByDefault: true,
278278
description: "The method annotated with [ObservableAsProperty] cannot currently initialize methods with parameters.",
279-
helpLinkUri: "https://www.reactiveui.net/errors/RXUISG0017");
279+
helpLinkUri: "https://www.reactiveui.net/docs/handbook/view-models/boilerplate-code.html");
280280
}

0 commit comments

Comments
 (0)