Releases: dennisdoomen/CSharpGuidelines
6.0.0
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...
5.7.0
5.6.0
What's Changed
- Updated menu titles to match with chapter titles by @bkoelman in #235
- Added missing collection interfaces to AV1130 by @bkoelman in #236
- Replaced broken link in AV1835 by @bkoelman in #237
- Updated AV1545 to use null-coalescing assignment operator (C# 8) by @bkoelman in #244
- Various small fixes and improvements by @bkoelman in #242
- Added guidance on composite string formatting by @bkoelman in #241
- Added link for async guidance by @bkoelman in #247
- Fix formatting of titles by @bkoelman in #238
- Updated C# version to 10 by @bkoelman in #251
- AV2210: Max warning level depends on TFM and compiler version by @bkoelman in #248
- Clarified the use of var (AV1520) and supplemented AV1707 (names) by @bkoelman in #252
Full Changelog: 5.5.0...5.6.0
5.5.0
What's Changed
- Just a few nits by @bkoelman in #188
- Updated title to match by @bkoelman in #189
- Small corrections by @bkoelman in #190
- Changed guidance on #region usage by @bkoelman in #192
- Revised AV1553 by @keremispirli in #193
- Aligned Cheatsheet with #193 (Revised AV1553) by @keremispirli in #194
- Redesign csharpguidelines by @mvhoute in #197
- Extract rules into separate Markdown files by @julianbartel in #196
- Make 1547 example compilable by @jnyrup in #201
- Add adjustment for long-running operations in AV1825 by @rynkevich in #204
- Updated guidance on the use of parentheses in expressions by @bkoelman in #208
- Added new rule for easy debugging by @bkoelman in #210
- Fix code format in 1701 and 2402 by @julianbartel in #213
- Remove ICollection as an allowed interface from AV1130 by @maikelsteneker in #216
- AV1739: Added note for discard usage on C# 9 by @bkoelman in #219
- AV2201 static member access by @bkoelman in #223
- Bump nokogiri from 1.8.2 to 1.11.4 by @dependabot in #226
- Bump addressable from 2.5.2 to 2.8.0 by @dependabot in #227
- Task / ValueTask related guidance by @czimpi in #230
New Contributors
- @keremispirli made their first contribution in #193
- @mvhoute made their first contribution in #197
- @julianbartel made their first contribution in #196
- @jnyrup made their first contribution in #201
- @rynkevich made their first contribution in #204
- @maikelsteneker made their first contribution in #216
- @dependabot made their first contribution in #226
- @czimpi made their first contribution in #230
Full Changelog: 5.4.0...5.5.0
5.4.0
- {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
- {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
5.2.0
- {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.csis 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
-
{New} Updated AV1501 to make types
sealedby 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/baseprefixes - #123 -
{New} Updated AV2400 to include expression bodied members and initializers - #118
-
{New} Rewrote AV1570 to use the
ispattern overaswithnullcheck - #114 -
{New} Updated AV1720 to include local functions naming guidelines - #117
-
{New} Updated AV2400 with the proper location of
staticand 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
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
isoperator 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
foreachloop 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