Skip to content

Releases: BenMorris/NetArchTest

v1.3.2

23 May 18:47
Compare
Choose a tag to compare

String literals are only checked on the HaveDependencyOnAny and HaveDependencyOnAll methods. This will minimise the risk of any false positives arising from the string literal checking behaviour that was re-introduced in v1.3.1 (#94)

Fixed an issue where the dependency search was not consistently checking whether a type has a dependency on itself (#95)

Removed some unnecessary dependencies from the project (#93)

Thanks for @NeVeSpl and @tibel for the pull requests.

v1.3.1

16 May 13:11
ef91e25
Compare
Choose a tag to compare

Checking for static classes added via new predicates (AreStatic and AreNotStatic) and conditions (BeStatic, NotBeStatic) (#89).

The dependency search now checks for dependenices in string literals (this is restored functionality lost in versionn 1.2.6 (#79, #82).

Compiler-generated types that are located outside of any namespace should not be detected by the dependency search (#78).

Updated the Mono.Cecil dependency to the latest version (#87).

Thanks for @RyanMarcotte, @Lorilatschki and @NeVeSpl, and @tibel for the pull requests.

v1.3.0

29 Oct 23:13
Compare
Choose a tag to compare

A significant rewrite of dependency searches which has improved performance and accuracy of searches. This fixed a number of problems including finding dependencies in attributes, generic dependencies, implemented interfaces, generic constraints, arrays, reference types and pointers (see #62 for full details).

Added method overloads for HaveNameStartingWith, DoNotHaveNameStartingWith, HaveNameEndingWith, and DoNotHaveNameEndingWith that accept a StringComparison parameter.

Added new methods that allow you to specify lists of permissible dependencies: OnlyHaveDependenciesOn() and HaveDependenciesOtherThan() (#72)

Fixed an issue where the "IsPublic" test for internal classes was returning the wrong result (#74).

Thanks to @NeVeSpl and @RyanMarcotte for the pull requests.

v1.2.6

13 Aug 18:37
Compare
Choose a tag to compare

Custom rules can now be created and applied as predicates and conditions. A custom rule has to implement ICustomRule and can be executed using a MeetCustomRule() method (see the README and the sample project for examples).

Added HaveCustomAttributeOrInherit and NotHaveCustomAttributeOrInherit as predicates and conditions to test for inherited custom attributes (#55)

The following bugs have been fixed:

  • ResideInNamespaceContaining now selects nested types (#59)
  • Fixed issues with detecting dependencies in generics (#57 and #58)
  • Fixed an issue where subclass detection was not taking the assembly into account properly (#52 and #56)
  • Fixed an issue where types were being excluded if they were in a namespace with a System prefix (#36, #47 and #48)

Thanks to @NeVeSpl and @jsantha for the pull requests.

v1.2.5

06 Mar 12:38
25ca858
Compare
Choose a tag to compare

The dependency search logic has been re-written so it can scale for very large projects. It can now handle projects with thousands of modules and dependencies in a few seconds as opposed to a few hours.

A pattern matching bug has been fixed where false positives were being returned for both namespace and class names matching the input text.

Dependencies will now be found in a method's parameter list and a list of generic arguments.

Fixed an issue where the wrong types were being returned when the Or() method was used in conditions (#38).

A number of namespace matching methods have been added as predicates and conditions:

  • ResideInNamespaceStartingWith
  • ResideInNamespaceEndingWith
  • ResideInNamespaceContaining
  • DoNotResideInNamespaceStartingWith
  • DoNotResideInNamespaceEndingWith
  • DoNotResideInNamespaceContaining

Fixed the TypeDefinition.GetType() extension method so it will load managed C++ template instances.

Dependencies have been updated and test\sample projects brought up to .Net Core 3.1.

Many thanks to the contributors to this release: @AlexeyGorelenkov, @NeVeSpl and @vip32

v1.2.4

22 Jan 20:09
b4ffc95
Compare
Choose a tag to compare

All compiler-generated classes are ignore now, not just those created to enable async\await.
The params keyword has been added to the parameters of dependency checking methods.

v1.2.3

21 Oct 21:48
Compare
Choose a tag to compare

Added a new property FailingTypeNames to TestResults. This allows you to list the failing types for a test without the risk of tripping a FileLoadException due to missing dependencies (issue #26)

v1.2.2

24 Aug 14:29
Compare
Choose a tag to compare

You can now distinguish between nested public and nested private classes. BeNestedPublic() and BeNestedPrivate() have been added as predicates and conditions. BeNested() will continue to select nested classes regardless of scope.

New dependency checking methods have been added that accept a list of dependencies. HaveDependencyOnAny() and HaveDependencyOnAll() are available as predictaes and conditions.

Dependency checking now splits instructions into individual tokens when searching.

v1.2.1

01 Jul 06:28
ae953a7
Compare
Choose a tag to compare

Accumulated bug fixes and minor changes:

  • You can now specify optional search directories when loading Types using the Types.InAssembly or Types.InAssemblies methods
  • Fixed a bug where rules were returning the wrong type list if a ShouldNot() condition was being used.
  • Types that cannot be loaded by Mono.Cecil no longer throw a BadImageFormatException
  • Fixed a typo in the "HasViolations" method - NB: this is a breaking change as it will require changes to existing implementations.

v1.1.4

28 Apr 07:12
5c6634e
Compare
Choose a tag to compare

Added policies, a construct that lets you aggregate groups of rules together for reporting.

Many thanks to @ewassef for the idea and initial implementation.