Skip to content

code-rules

3 posts with the tag “code-rules”

Code rules for everyone, architecture rules included — and when a Roslyn analyzer is the better home

Solution.Parser started as a way to make Roslyn-analyzer-style rules something every developer can write. Along the way it became just as useful for architecture validation: layering, project references, packages and XAML. How the pieces fit, and when a rule should graduate to a real analyzer.

Your solution as a queryable model — code rules as LINQ with Solution.Parser

The team guideline says "no DateTime.Now", and code review finds it again every other week. Solution.Parser turns the whole solution into a typed model you query with LINQ, so a rule like that becomes a five-line unit test with clickable findings. How to get started, how to structure a rule suite, and how to prove a rule actually catches something.