What's Changed
New
- Add AV0100: Understand the boundaries of your codebase by @dennisdoomen in #300
- Add AV0105: Use design patterns to communicate intent by @dennisdoomen in #301
- Add AV0110: Prefer composition over class inheritance by @dennisdoomen in #302
- Add AV0112: Apply the Principle of Least Surprise by @dennisdoomen in #303
- Add AV0115: Keep It Simple Stupid (KISS) by @dennisdoomen in #304
- Add AV0120: You Ain't Gonna Need It (YAGNI) by @dennisdoomen in #305
- Add AV0125: Don't Repeat Yourself (DRY) within boundaries by @dennisdoomen in #306
- Add AV0135: Treat AI-generated code as your own by @dennisdoomen in #308
- Add AV1582: Use raw string literals for multi-line or escape-heavy strings by @dennisdoomen in #318
- Add AV1608: Show what's important in a test, hide what's not by @dennisdoomen in #323
- Add AV1610: Use Test Data Builders or Object Mothers to construct test objects by @dennisdoomen in #324
- Add AV1618: Don't use production code in test assertions by @dennisdoomen in #326
- Add AV1615: Prefer inline literals over constant variables in tests by @dennisdoomen in #325
- Add AV1602: Postfix test classes with
Specsinstead ofTestsby @dennisdoomen in #321 - Add AV1605: Test behavior, not implementation details by @dennisdoomen in #322
- Add AV1600: Use short concise functional test names by @dennisdoomen in #320
- Add AV1578: Align projects with deployment units, not architectural layers by @dennisdoomen in #317
- Add AGENTS.md and csharp-guidelines agent skill by @dennisdoomen in #394
- Add AV2308: Document what a member tries to do, not what it does or how it does it by @dennisdoomen in #330
- Add AV2225: Use deconstruction to simplify variable assignments by @dennisdoomen in #329
- Add AV1622: Test concrete implementations as part of a larger integration scope by @dennisdoomen in #328
- Add AV1620: Test reusable components separately from their consumers by @dennisdoomen in #327
- Add AV1585: Make properties required when they must be set during initialization by @dennisdoomen in #319
- Add AV1155: Use the
fieldkeyword in auto-properties when additional logic is needed by @dennisdoomen in #316 - Add AV1150: Avoid local functions by @dennisdoomen in #315
- Add AV1145: Use extension members to add behavior without modifying the original type by @dennisdoomen in #314
- Add AV1035: Use primary constructors when they improve readability by @dennisdoomen in #313
- Add AV1032: Consider a delegate instead of an interface with a single method by @dennisdoomen in #312
- Add AV1030: Know when to use a record and when to use a class by @dennisdoomen in #311
- Add AV1002: Only pass things to a constructor that most or all members need by @dennisdoomen in #309
- Add AV0130: Apply the four pillars of object-oriented programming by @dennisdoomen in #307
- Add C# Guidelines AI agent skill by @dennisdoomen in #400
Deprecated
- Remove AV1530: Don't change a loop variable inside a
forloop or a collection in aforeachloop by @dennisdoomen in #363 - Remove AV2235: Favor
async/awaitoverTaskcontinuations by @dennisdoomen in #342 - Deprecate AV1580 guideline (Write code that is easy to debug) by @dennisdoomen in #392
- Update AV1554: Do not use optional parameters in interface methods or their concrete implementations by @dennisdoomen in #367
- AV1230: Consider providing property-changed events by @dennisdoomen in #357
- Remove AV2307: Write MSDN-style documentation by @dennisdoomen in #343
- Remove AV2221: Use lambda expressions instead of anonymous methods by @dennisdoomen in #341
- Remove AV2201: Use C# type aliases instead of the types from the
Systemnamespace by @dennisdoomen in #339 - Remove AV1738: Prefix an event handler with "On by @dennisdoomen in #338
- Remove AV1737: Use
-ingand-edto express pre-events and post-events by @dennisdoomen in #337 - Remove AV1568: Don't use parameters as temporary variables by @dennisdoomen in #336
- Remove AV1525: Don't make explicit comparisons to
trueorfalseby @dennisdoomen in #333 - Remove AV1510: Use
usingstatements instead of fully qualified type names by @dennisdoomen in #332 - Remove AV1220: Always check an event handler delegate for
nullby @dennisdoomen in #331 - Remove AV2207: Don't hard-code strings that change based on the deployment by @dennisdoomen in #340
- Remove severity field from all rules by @dennisdoomen in #398
Refined
- AV2400: Simple properties/events on single line by @bkoelman in #274
- Update AV1708: Name types using nouns, noun phrases or adjective phrases by @dennisdoomen in #372
- Update AV1562: Don't use
reforoutparameters by @dennisdoomen in #368 - Update AV1800: Consider using
Any()to determine whether anIEnumerable<T>is empty by @dennisdoomen in #375 - Update AV1521: Declare and initialize variables as late as possible by @dennisdoomen in #361
- Update AV1520: Only use
varwhen the type is evident by @dennisdoomen in #360 - Update AV1140: Consider creating domain-specific types rather than using primitives by @dennisdoomen in #356
- Update AV1250: Materialize the result of a LINQ expression before returning it by @dennisdoomen in #358
- Update AV1115: A property, method or local function should do only one thing by @dennisdoomen in #352
- Update AV1025: Classes should have state and behavior by @dennisdoomen in #351
- Update AV1020: Avoid bidirectional dependencies by @dennisdoomen in #350
- Update AV1011: It should be possible to treat a derived type as if it were a base type by @dennisdoomen in #348
- Update AV1010: Don't suppress compiler warnings using the
newkeyword by @dennisdoomen in #347 - Update AV1003: An interface should be small and focused by @dennisdoomen in #345
- Update AV1835: Beware of
async/awaitdeadlocks in UI frameworks (e.g. WPF, WinForms) by @dennisdoomen in #378 - Update AV1825: Prefer
Task.Runfor CPU-intensive activities by @dennisdoomen in #377 - Update AV1000: A class or interface should have a single purpose by @dennisdoomen in #344
- Update page: Links & Articles by @dennisdoomen in #387
- Update page: Cover and Styles by @dennisdoomen in #384
- Update AV2400: Use a common layout by @dennisdoomen in #382
- Split minor site updates from #298 by @dennisdoomen in #383
- Update AV1706: Don't use abbreviations by @dennisdoomen in #371
- Update AV1701: Use US English by @dennisdoomen in #370
- Update AV1755: Only use
AsyncorTaskAsyncas a suffix when a method has both synchronous and asynchronous versions by @dennisdoomen in #374 - Clarify suffix usage for Async methods by @bkoelman in #393
- Update AV2305: Document all
public,protectedandinternaltypes and members by @dennisdoomen in #381 - Update AV2202: Prefer language syntax over explicit calls to underlying implementations by @dennisdoomen in #379
- Update AV1820: Only use
asyncfor I/O-bound or long-running activities by @dennisdoomen in #376 - AV0125: Consider duplicating simple logic across modules to reduce coupling by @dennisdoomen in #369
- Update AV1553: Only use optional parameters to replace overloads by @dennisdoomen in #366
- Update AV1546: Prefer interpolated strings over concatenation or
string.Format. by @dennisdoomen in #365 - Update AV1545: Don't use an
if-elseconstruct instead of a simple (conditional) assignment by @dennisdoomen in #364 - Update AV1523: Favor object and collection initializers over separate statements by @dennisdoomen in #362
- Update AV1500: Methods should not exceed 15 statements by @dennisdoomen in #359
- Update AV1137: Keep parameters as specific and narrow as possible by @dennisdoomen in #355
- Update AV1130: Return interfaces to unchangeable collections by @dennisdoomen in #354
- Update AV1125: Don't expose stateful objects through static members by @dennisdoomen in #353
- Update AV1013: Don't cast a base class to one of its derived classes by @dennisdoomen in #349
- Update AV1011: Add LSP example with polymorphism by @dennisdoomen in #396
- Update AV1004: Use an interface rather than a base class to support multiple implementations by @dennisdoomen in #346
- Remove AV1532: Avoid nested loops by @dennisdoomen in #334
- Improve introduction readability and onboarding guidance by @dennisdoomen in #399
Full Changelog: 5.7.0...6.0.0