Skip to content

Releases: SteveGilham/Gendarme

2024.6.28.12460

28 Jun 14:37
Compare
Choose a tag to compare
  • Handle injected "[Embedded]" attributes more generally by ignoring them for AttributeArgumentsShouldHaveAccessorsRule

2023.12.27.19054

28 Jun 14:36
Compare
Choose a tag to compare
  • Ignore badly formed attribute types ([Nullable] and [Embedded]) injected by the C# compiler

2023.8.26.15512

26 Aug 16:23
Compare
Choose a tag to compare
  • Ignore badly formed types injected by the dotnet 7.0.400 and 8.0pv FSharp compiler

2023.1.22.12221

22 Jan 12:46
Compare
Choose a tag to compare
  • [BUGFIX] Fix environment dependent NRE in AvoidUncalledPrivateCodeRule (and others)
  • [BUGFIX] Fix possible false -ves wrt tasks in EnsureLocalDisposalRule

2023.1.21.13293

21 Jan 13:58
Compare
Choose a tag to compare
  • Exempt Task and Task<'T> from EnsureLocalDisposalRule as they generally should not be disposed manually.
  • Remove the "no arguments means no error" hack from InstantiateArgumentExceptionCorrectlyRule to align its behaviour with FxCop's CA2208:InstantiateArgumentExceptionsCorrectly; only with the added trick of looking at the top-level user-declared method in case of compiler generated functions (e.g. in yield based iterators)

2022.12.6.7345

06 Dec 21:14
Compare
Choose a tag to compare
  • [BUGFIX] Address some context dependent instances of assembly resolution failure in previous release

2022.12.5.10565

  • Adjust DoNotAssumeIntPtrSizeRule to allow for compiler changes at dotnet 7.0. There will still be false negatives as casts involving IntPtr are now inlined, rather than going to op_Explicit

2022.12.5.10565 **critical bug**

06 Dec 21:11
Compare
Choose a tag to compare
Pre-release
  • Adjust DoNotAssumeIntPtrSizeRule to allow for compiler changes at dotnet 7.0. There will still be false negatives as casts involving IntPtr are now inlined, rather than going to op_Explicit

2022.2.17.8350

17 Feb 08:44
Compare
Choose a tag to compare
  • First stable release
  • Make a heuristic fix for the changed IL that meant a test failure for AvoidUnnecessarySpecializationRule
    • code that was IL_0001: ldarga.s x/ IL_0003: constrained. !!T (stack unchanged) is now IL_0001: ldarg.1/IL_0002: box !!T which pops the loaded value and pushes the boxed copy, so treat ldarg+box as a unit.
  • Make heuristic fixes for CheckParametersNullityInVisibleMethods -- also related to boxing generics; and cases of different choices of comparison operation
  • Propagate the checks for the changed null comparison IL to ProtectCallToEventDelegatesRule
  • Fix false negatives in DelegatesPassedToNativeCodeMustIncludeExceptionHandlingRule
  • Fix false negative in TestNativeFieldsArray -- extended checks for new changed IL

2022.2.9.17153-pre-release

09 Feb 17:23
Compare
Choose a tag to compare
Pre-release
  • [NEW RULE] AltCode.Rules.General.AvoidAssemblySemanticVersionMismatchRule to insist that the API contract (major, minor, and optionally build if defined for the assembly) match, but the lesser facets, revision and possibly build are free.
  • Revive Correctness rule DeclareEventsExplicitlyRule
  • Update for modern C# dialect e.g. allow discard _ as a variable name
  • Fix PreferIFormatProviderOverrideRule and PreferStringComparisonOverrideRule to spot more than just the first instance of any given method with a preferred override
  • In AvoidMethodsWithSideEffectsInConditionalCodeRule, consider System.Array.Empty<T>() to be pure.
  • AvoidUninstantiatedInternalClassesRule checks if internal attribute types are used in the assembly, and counts those as instantiation
  • Include changes from the upstream repo
    • Add more heuristics to DoNotHardcodePathsRule
    • Tune the severity and confidence levels of AvoidUnnecessarySpecializationRule and the "avoid duplicated code" rules according to context
    • Test a wider set of use cases in DoNotUseLockedRegionOutsideMethodRule

2022.1.25.12143-pre-release

25 Jan 12:27
Compare
Choose a tag to compare
Pre-release
  • Reinstate Gendarme.Rules.Security.Cas.DoNotExposeFieldsInSecuredTypeRule, mistakenly deleted
  • New rules
    • AltCode.Rules.General.PreferStrongNamedAssembliesRule to replace deprecated/withdrawn FxCop rule Microsoft.Design#CA2210:AssembliesShouldHaveValidStrongNames
    • AltCode.Rules.PowerShell.UseOnlyStandardVerbsRule to replace "Microsoft.PowerShell#PS1001:UseOnlyStandardVerbs"
  • [net472] Reinstate the obsolescing code access security rules as the assembly Obsolete.Rules.Security.Cas.dll; this covers rules
    • AddMissingTypeInheritanceDemandRule
    • DoNotExposeMethodsProtectedByLinkDemandRule
    • DoNotReduceTypeSecurityOnMethodsRule
    • SecureGetObjectDataOverridesRule