Skip to content

Releases: dennisdoomen/CSharpGuidelines

6.0.0

16 May 06:52
7ee0a68

Choose a tag to compare

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 Specs instead of Tests by @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 field keyword 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 for loop or a collection in a foreach loop by @dennisdoomen in #363
  • Remove AV2235: Favor async/await over Task continuations 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 System namespace by @dennisdoomen in #339
  • Remove AV1738: Prefix an event handler with "On by @dennisdoomen in #338
  • Remove AV1737: Use -ing and -ed to 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 true or false by @dennisdoomen in #333
  • Remove AV1510: Use using statements instead of fully qualified type names by @dennisdoomen in #332
  • Remove AV1220: Always check an event handler delegate for null by @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 ref or out parameters by @dennisdoomen in #368
  • Update AV1800: Consider using Any() to determine whether an IEnumerable<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 var when 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 new keyword by @dennisdoomen in #347
  • Update AV1003: An interface should be small and focused by @dennisdoomen in #345
  • Update AV1835: Beware of async/await deadlocks in UI frameworks (e.g. WPF, WinForms) by @dennisdoomen in #378
  • Update AV1825: Prefer Task.Run for 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...
Read more

5.7.0

27 Jan 15:21
1780a9d

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 5.6.0...5.7.0

5.6.0

10 Mar 12:43
f720261

Choose a tag to compare

What's Changed

Full Changelog: 5.5.0...5.6.0

5.5.0

31 Jan 16:32
4ad2ebe

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 5.4.0...5.5.0

5.4.0

03 Aug 09:33

Choose a tag to compare

  • {New} Extended AV1135 with Task-specified defaults - #174
  • {New] Rule references are now clickable on the site, the HTML and the PDF
  • {Fix} Removed the unnecessary Where() in the example of AV2221 - #181
  • {Fix} Fixed the search functionality
  • {Fix} Fixed broken links - #182. #184
  • {Fix} Query and method syntax are both LINQ so AV2200 is about avoiding query syntax and preferring method syntax - #183
  • {Fix} Fixed the broken layout of the tables.
  • {Fix] Documented the steps to build the PDFs.
  • {Fix} Removed an old obsolete section.
  • {Fix} Removed any references to GhostDoc since I no longer believe in those generated docs.
  • {Fix} Fixed an inconsistency between AV2220 and AV2400 - #173
  • {Fix} Rephrased AV1830 to mention the current sync context - #163

See also 5.3.0...5.4.0 for the commits.

Kudos to @Barsonax, @synercoder and @danbowker for the contributions.

5.3.0

05 Jul 09:16
1a90b74

Choose a tag to compare

  • {Fix} Revert: replace underscores with discards - #164
  • {Fix} Corrected the example of AV1522 - #168
  • {Fix} Corrected the example of AV2235 that was not using Task - #172
  • {Fix} Corrected terminology in AV2221 - #171
  • {New} Added exception for immutable collections in AV1130 - #165
  • {Fix} Removed FxCop references - #175
  • {Fix} Updated naming in AV1706/AV1738 to match with Resharper - #177

Kudos @bkoelman for this release.

5.2.1

23 May 11:07

Choose a tag to compare

5.2.0

13 May 09:30

Choose a tag to compare

  • {New} Updated support for C# 7.3 - #159
  • {New} Added new guideline (AV2410) to use expression-bodied members appropriately - #142
  • {New} Added new guideline (AV2202) to prefer using language syntax over directly calling the underlying framework implementation - #144
  • {New} Added naming guidelines for tuples to AV1702 - #146
  • {New} Added specific guidelines for local functions - #92
  • {New} Added tuple constraints to AV1561 - #161
  • {Breaking} Removed AV2205 that dealt with naming of identifiers refering to localized resources - #143
  • {Breaking} Removed AV2215 since manually providing the contents of the AssemblyInfo.cs is no longer needed - #143
  • {Fix} Removed the incomplete part about running a command-line to compile the Markdown versions of the guidelines and cheatsheet to self-contained HTML files - #133
  • {Fix} Don't append a CR and LF to the output, since this is rendered visibly - #134
  • {Fix} Fixed the generic part of the example in AV1220 - #137
  • {Fix} Reorganized the naming conventions table in AV1702 to remove ambiguity - #145
  • {Fix} Various typos and grammer improvements - #160

Kudos to @bkoelman for doing all of the hard work in this release.

5.1.0

04 Apr 06:04

Choose a tag to compare

  • {New} Updated AV1501 to make types sealed by default - #71

  • {New} Added rule AV1026 "Classes should protect the consistency of their internal state" - #78

  • {New} Added a reference to the four principles of OOP - #79

  • {New} Use null-conditional operator for event invocations in AV1220 - #82

  • {New} Update AV1739 for discards using _ and __ - #90

  • {New} Updated examples in AV1545 and added ternary operator example - #88

  • {New} Allow multiple assignments per statement in AV1552 by using out variables, is-patterns or deconstruction into tuples - #100

  • {New} Added example for new-format dictionary initializers - #101

  • {New} Added null-conditional operator example to AV1545 - #103

  • {New} Added tuples and exception for TryParse to AV1562 - #113

  • {New} Added naming conventions for local functions & tuple elements to AV1702 - #115

  • {New} Added ordering guidelines for local functions - #119

  • {New} Added guidelines on where to put namespaces - #122

  • {New} Added new rule (AV1251) for this/base prefixes - #123

  • {New} Updated AV2400 to include expression bodied members and initializers - #118

  • {New} Rewrote AV1570 to use the is pattern over as with null check - #114

  • {New} Updated AV1720 to include local functions naming guidelines - #117

  • {New} Updated AV2400 with the proper location of static and aliases - #126

  • {Fix} Added example to AV1515 on using binary literal with digit separator - #125

  • {Fix} Updated type naming examples in AV1708 - #84

  • {Fix} Rephrased AV1010 based on feedback - #80

  • {Fix} Fixed links to SOLID principels and Uncle Bob's site - #63

  • {Fix} Updated example of AV1225 to match naming rules - #73

  • {Fix} Fixed a misleading example in AV1553 on multiple overloads - #66

  • {Fix} Fixed the reference to AV1135 in AV1553 - #75

  • {Fix} Clarified the layout of multi-line members in AV2400 - #76

  • {Fix} Added a differentiation between acronyms and abbreviations in AV1706 - #81

  • {Fix} Updated AV1506 to account for generic types - #89

  • {Fix} Various small corrections - #95

Special thanks to the significant contributions of @bkoelman

5.0.0

18 Oct 17:58

Choose a tag to compare

Release Notes

  • {Changed} Update the styles to match the official Aviva Solutions styling
  • {Changed} Added an exception to AV2201 to mention methods like GetUInt16 or ReadString - #14
  • {Changed} Removed a remark on the is operator from AV1570 - #42
  • {Changed} Clarified the difference between a local variable and a class-level variable in AV1701 - #16
  • {Changed} Altered the example of calling overloads without duplication in AV1551 - #20
  • {Changed} Added a preference for using just a verb for naming methods - #19.
  • {Fix} Corrected the usage of parentheses and braces in AV2400 - #13
  • {Fix} The loop variable in a foreach loop is read-only, so updated the example in AV1530 - #39
  • {Fix} The example code AV2221 did not even compile - #41
  • {Fix} Lots of spelling and typo corrections
  • {Fix} Fixed the reference to Jeremy's article Isolate The Ugly Stuff - #21

Downloads