Skip to content

Commit e68c8a6

Browse files
authored
feat!: move to StyleSharp analyzers and ReactiveUI 26, add ReactiveUI.Validation.Reactive (#990)
* feat!: move to StyleSharp analyzers and ReactiveUI 26, add ReactiveUI.Validation.Reactive - Replace StyleCop.Analyzers and Roslynator with StyleSharp, PerformanceSharp and SecuritySharp, matching ReactiveUI.Binding.SourceGenerators. - Fix every analyzer finding in the library, AndroidX, tests and samples. - Update NuGet packages, including ReactiveUI 26 and TUnit 1.72. - Use the WhenAnyValueUnsafe overloads where an expression is passed in, since ReactiveUI 26 only intercepts literal lambdas. - Resolve the default formatter with GetServices. Containers that throw from GetService for an unregistered type then fall back to the default formatter (#979). - Add ReactiveUI.Validation.Reactive, built from the same source against ReactiveUI.Reactive (#967). - Track the public API with PublicApiSharp baselines in place of the Verify approval tests. - Raise the MinVer floor to 8.0. BREAKING CHANGE: Requires ReactiveUI 26. View model type parameters need a class constraint. Optional parameters on public methods and constructors are now overloads, so callers must recompile. * fix(android): stop shipping the generated Resource class - Set AndroidGenerateResourceDesigner to false for every Android target. - The libraries ship no Android resources, so the designer only added an empty public Resource type. * feat(androidx): add ReactiveUI.Validation.AndroidX.Reactive - Build the AndroidX extensions a second time against ReactiveUI.AndroidX.Reactive and ReactiveUI.Validation.Reactive. - Apps on ReactiveUI.Reactive get the TextInputLayout bindings under ReactiveUI.Validation.Reactive.Extensions. * build: check out every text file with LF line endings - Copy .gitattributes from ReactiveUI.Binding.SourceGenerators. - A Windows checkout with core.autocrlf rewrites files to CRLF, and the line-ending analyzer then fails the Windows build. * test: restore full line coverage - Remove the validity subject in BasePropertyValidation. Nothing ever pushed a value into it. - Bind ValidationContext properties by name. The generated ToProperty never runs the lambda, which left those lines uncovered. - Cover the Dispose(false) paths, the parameterless overloads and the non-generic enumerators.
1 parent 76e7ee6 commit e68c8a6

144 files changed

Lines changed: 15361 additions & 5648 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 2435 additions & 502 deletions
Large diffs are not rendered by default.

‎.gitattributes‎

Lines changed: 27 additions & 277 deletions
Original file line numberDiff line numberDiff line change
@@ -1,278 +1,28 @@
1-
# Catch all for anything we forgot. Add rules if you get CRLF to LF warnings.
2-
* text=auto
3-
# Text files that should be normalized to LF in odb.
4-
*.cs text diff=csharp
5-
*.xaml text
6-
*.config text
7-
*.c text
8-
*.h text
9-
*.cpp text
10-
*.hpp text
11-
*.sln text
12-
*.csproj text
13-
*.vcxproj text
14-
*.tt text
15-
*.sh text
16-
*.ps1 text
17-
*.cmd text
18-
*.bat text
19-
*.markdown text
20-
*.msbuild text
21-
# Binary files that should not be normalized or diffed
22-
*.png binary
23-
*.jpg binary
24-
*.gif binary
25-
*.ico binary
26-
*.rc binary
27-
*.pfx binary
28-
*.snk binary
29-
*.dll binary
30-
*.exe binary
31-
*.lib binary
32-
*.exp binary
33-
*.pdb binary
34-
*.sdf binary
35-
*.7z binary
36-
# Generated file should just use CRLF, it's fiiine
37-
SolutionInfo.cs text eol=crlf diff=csharp
1+
# Every text file is stored and checked out with LF, on every platform.
2+
#
3+
# Without this, a Windows checkout with core.autocrlf=true rewrites LF to CRLF
4+
# on the way to disk. The line-ending analyzer then fails the whole build on the
5+
# Windows leg while the Linux and macOS legs pass, because the files on disk no
6+
# longer match what is in the repository. `eol=lf` pins the checkout, so the
7+
# working tree matches the index everywhere.
8+
#
9+
# The .editorconfig already sets end_of_line = lf for editors; this is the same
10+
# rule for git, which editors do not control.
11+
* text=auto eol=lf
3812

39-
# Binary content that no other rule covers.
40-
*.3ds binary
41-
*.3g2 binary
42-
*.3gp binary
43-
*.BMP binary
44-
*.DS_Store binary
45-
*.GIF binary
46-
*.JPEG binary
47-
*.JPG binary
48-
*.PNG binary
49-
*.a binary
50-
*.aac binary
51-
*.adp binary
52-
*.ai binary
53-
*.aif binary
54-
*.aiff binary
55-
*.alz binary
56-
*.ape binary
57-
*.apk binary
58-
*.ar binary
59-
*.arj binary
60-
*.asf binary
61-
*.au binary
62-
*.avi binary
63-
*.bak binary
64-
*.baml binary
65-
*.bh binary
66-
*.bin binary
67-
*.bk binary
68-
*.bmp binary
69-
*.btif binary
70-
*.bz2 binary
71-
*.bzip2 binary
72-
*.cab binary
73-
*.caf binary
74-
*.cgm binary
75-
*.class binary
76-
*.cmx binary
77-
*.cpio binary
78-
*.cr2 binary
79-
*.csv binary
80-
*.cur binary
81-
*.dat binary
82-
*.dcm binary
83-
*.deb binary
84-
*.dex binary
85-
*.djvu binary
86-
*.dmg binary
87-
*.dng binary
88-
*.doc binary
89-
*.docm binary
90-
*.docx binary
91-
*.dot binary
92-
*.dotm binary
93-
*.dra binary
94-
*.dsk binary
95-
*.dts binary
96-
*.dtshd binary
97-
*.dvb binary
98-
*.dwg binary
99-
*.dxf binary
100-
*.ecelp4800 binary
101-
*.ecelp7470 binary
102-
*.ecelp9600 binary
103-
*.egg binary
104-
*.eol binary
105-
*.eot binary
106-
*.epub binary
107-
*.f4v binary
108-
*.fbs binary
109-
*.fh binary
110-
*.fla binary
111-
*.flac binary
112-
*.fli binary
113-
*.flv binary
114-
*.fpx binary
115-
*.fst binary
116-
*.fvt binary
117-
*.g3 binary
118-
*.graffle binary
119-
*.gz binary
120-
*.gzip binary
121-
*.h261 binary
122-
*.h263 binary
123-
*.h264 binary
124-
*.icns binary
125-
*.ief binary
126-
*.img binary
127-
*.ipa binary
128-
*.iso binary
129-
*.jar binary
130-
*.jpeg binary
131-
*.jpgv binary
132-
*.jpm binary
133-
*.jxr binary
134-
*.key binary
135-
*.ktx binary
136-
*.lha binary
137-
*.lvp binary
138-
*.lz binary
139-
*.lzh binary
140-
*.lzma binary
141-
*.lzo binary
142-
*.m3u binary
143-
*.m4a binary
144-
*.m4v binary
145-
*.mar binary
146-
*.mht binary
147-
*.mid binary
148-
*.midi binary
149-
*.mj2 binary
150-
*.mka binary
151-
*.mkv binary
152-
*.mmr binary
153-
*.mng binary
154-
*.mobi binary
155-
*.mov binary
156-
*.movie binary
157-
*.mp3 binary
158-
*.mp4 binary
159-
*.mp4a binary
160-
*.mpeg binary
161-
*.mpg binary
162-
*.mpga binary
163-
*.mxu binary
164-
*.nef binary
165-
*.npx binary
166-
*.numbers binary
167-
*.o binary
168-
*.oga binary
169-
*.ogg binary
170-
*.ogv binary
171-
*.otf binary
172-
*.pages binary
173-
*.pbm binary
174-
*.pcx binary
175-
*.pdf binary
176-
*.pea binary
177-
*.pgm binary
178-
*.pic binary
179-
*.pnm binary
180-
*.pot binary
181-
*.potm binary
182-
*.potx binary
183-
*.ppa binary
184-
*.ppam binary
185-
*.ppm binary
186-
*.pps binary
187-
*.ppsm binary
188-
*.ppsx binary
189-
*.ppt binary
190-
*.pptm binary
191-
*.pptx binary
192-
*.psd binary
193-
*.pya binary
194-
*.pyc binary
195-
*.pyo binary
196-
*.pyv binary
197-
*.qt binary
198-
*.rar binary
199-
*.ras binary
200-
*.raw binary
201-
*.resources binary
202-
*.rgb binary
203-
*.rip binary
204-
*.rlc binary
205-
*.rmf binary
206-
*.rmvb binary
207-
*.rtf binary
208-
*.rz binary
209-
*.s3m binary
210-
*.s7z binary
211-
*.scpt binary
212-
*.sgi binary
213-
*.shar binary
214-
*.sil binary
215-
*.sketch binary
216-
*.slk binary
217-
*.smv binary
218-
*.so binary
219-
*.sub binary
220-
*.swf binary
221-
*.tar binary
222-
*.tbz binary
223-
*.tbz2 binary
224-
*.tga binary
225-
*.tgz binary
226-
*.thmx binary
227-
*.tif binary
228-
*.tiff binary
229-
*.tlz binary
230-
*.ttc binary
231-
*.ttf binary
232-
*.txz binary
233-
*.udf binary
234-
*.uvh binary
235-
*.uvi binary
236-
*.uvm binary
237-
*.uvp binary
238-
*.uvs binary
239-
*.uvu binary
240-
*.viv binary
241-
*.vob binary
242-
*.war binary
243-
*.wav binary
244-
*.wax binary
245-
*.wbmp binary
246-
*.wdp binary
247-
*.weba binary
248-
*.webm binary
249-
*.webp binary
250-
*.whl binary
251-
*.wim binary
252-
*.wm binary
253-
*.wma binary
254-
*.wmv binary
255-
*.wmx binary
256-
*.woff binary
257-
*.woff2 binary
258-
*.wvx binary
259-
*.xbm binary
260-
*.xif binary
261-
*.xla binary
262-
*.xlam binary
263-
*.xls binary
264-
*.xlsb binary
265-
*.xlsm binary
266-
*.xlsx binary
267-
*.xlt binary
268-
*.xltm binary
269-
*.xltx binary
270-
*.xm binary
271-
*.xmind binary
272-
*.xpi binary
273-
*.xpm binary
274-
*.xwd binary
275-
*.xz binary
276-
*.z binary
277-
*.zip binary
278-
*.zipx binary
13+
# Never normalise binary content — a stray LF-to-CRLF pass corrupts it.
14+
*.png binary
15+
*.jpg binary
16+
*.jpeg binary
17+
*.gif binary
18+
*.ico binary
19+
*.pdf binary
20+
*.snk binary
21+
*.pfx binary
22+
*.dll binary
23+
*.exe binary
24+
*.zip binary
25+
*.nupkg binary
26+
*.ttf binary
27+
*.woff binary
28+
*.woff2 binary

‎.github/renovate.json‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
],
1212
"groupName": "analyzers",
1313
"matchPackageNames": [
14-
"/^Roslynator\\./",
15-
"/^stylecop\\.analyzers$/i"
14+
"/^(Style|Performance|Security|PublicApi)Sharp\\.Analyzers$/"
1615
]
1716
},
1817
{
@@ -26,17 +25,6 @@
2625
"/^Microsoft\\.SourceLink\\./"
2726
]
2827
},
29-
{
30-
"description": "Verify.TUnit is built against a specific TUnit version. The shared preset groups TUnit separately from Verify.*, which can split a matched pair across two PRs and red the build; keep them together here.",
31-
"matchManagers": [
32-
"nuget"
33-
],
34-
"groupName": "TUnit",
35-
"matchPackageNames": [
36-
"/^TUnit(\\.|$)/",
37-
"/^Verify\\./"
38-
]
39-
},
4028
{
4129
"description": "MessageBox.Avalonia is part of the Avalonia sample stack but does not carry the Avalonia prefix the shared preset matches on.",
4230
"matchManagers": [
@@ -47,16 +35,6 @@
4735
"/^Avalonia(\\.|$)/",
4836
"/^MessageBox\\.Avalonia$/"
4937
]
50-
},
51-
{
52-
"description": "Test and benchmark helpers that sit outside the framework cohorts the shared preset already groups.",
53-
"matchManagers": [
54-
"nuget"
55-
],
56-
"groupName": "test tooling",
57-
"matchPackageNames": [
58-
"/^PublicApiGenerator$/"
59-
]
6038
}
6139
]
6240
}

‎AGENTS.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dotnet restore ReactiveUI.Validation.slnx
2828
# Build the solution
2929
dotnet build ReactiveUI.Validation.slnx -c Release
3030
31-
# Build with warnings as errors (includes StyleCop violations)
31+
# Build with warnings as errors (includes StyleSharp, PerformanceSharp and SecuritySharp violations)
3232
dotnet build ReactiveUI.Validation.slnx -c Release -warnaserror
3333
3434
# Clean the solution
@@ -215,8 +215,10 @@ this.ValidationRule(
215215
### Style Enforcement
216216

217217
- EditorConfig rules (`.editorconfig`) - comprehensive C# formatting and naming conventions
218-
- StyleCop Analyzers - builds fail on violations
219-
- Roslynator Analyzers - additional code quality rules
218+
- StyleSharp.Analyzers (SST rules) - style and maintainability; builds fail on violations
219+
- PerformanceSharp.Analyzers (PSH rules) - performance
220+
- SecuritySharp.Analyzers (SES rules) - security
221+
- Rule docs: https://github.com/glennawatson/RoslynCommonAnalyzers/tree/main/docs/rules
220222
- **All public APIs require XML documentation comments**
221223

222224
### C# Style Rules

‎CLAUDE.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dotnet restore ReactiveUI.Validation.slnx
2828
# Build the solution
2929
dotnet build ReactiveUI.Validation.slnx -c Release
3030
31-
# Build with warnings as errors (includes StyleCop violations)
31+
# Build with warnings as errors (includes StyleSharp, PerformanceSharp and SecuritySharp violations)
3232
dotnet build ReactiveUI.Validation.slnx -c Release -warnaserror
3333
3434
# Clean the solution
@@ -215,8 +215,10 @@ this.ValidationRule(
215215
### Style Enforcement
216216

217217
- EditorConfig rules (`.editorconfig`) - comprehensive C# formatting and naming conventions
218-
- StyleCop Analyzers - builds fail on violations
219-
- Roslynator Analyzers - additional code quality rules
218+
- StyleSharp.Analyzers (SST rules) - style and maintainability; builds fail on violations
219+
- PerformanceSharp.Analyzers (PSH rules) - performance
220+
- SecuritySharp.Analyzers (SES rules) - security
221+
- Rule docs: https://github.com/glennawatson/RoslynCommonAnalyzers/tree/main/docs/rules
220222
- **All public APIs require XML documentation comments**
221223

222224
### C# Style Rules

0 commit comments

Comments
 (0)
⌂ 换网址