Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,7 @@ Architecture architecture
foreach (var ruleType in ruleTypes)
{
if (
interfaceList.Count > 0
? ruleType.ImplementedInterfaces.Intersect(interfaceList).Any()
: ruleType.ImplementedInterfaces.Any()
interfaceList.Count > 0 && ruleType.ImplementedInterfaces.Intersect(interfaceList).Any()
)
{
yield return new ConditionResult(ruleType, true);
Expand All @@ -592,7 +590,7 @@ Architecture architecture
}

var description = interfaces.FormatDescription(
"implement any interface",
"implement any of no interfaces (always false)",
"implement",
"implement any"
);
Expand Down Expand Up @@ -1211,11 +1209,10 @@ Architecture architecture
var interfaceList = interfaces.GetObjects(architecture).ToList();
foreach (var ruleType in ruleTypes.ToList())
{
var matchingInterfaces =
interfaceList.Count > 0
? ruleType.ImplementedInterfaces.Intersect(interfaceList).ToList()
: ruleType.ImplementedInterfaces.ToList();
if (matchingInterfaces.Any())
var matchingInterfaces = ruleType.ImplementedInterfaces.Intersect(
interfaceList
);
if (interfaceList.Count > 0 && matchingInterfaces.Any())
{
yield return new ConditionResult(
ruleType,
Expand All @@ -1232,7 +1229,7 @@ Architecture architecture
}

var description = interfaces.FormatDescription(
"not implement any interface",
"not implement any of no interfaces (always true)",
"not implement",
"not implement any"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,11 @@ IEnumerable<T> Condition(IEnumerable<T> ruleTypes, Architecture architecture)
{
var interfaceList = interfaces.GetObjects(architecture).ToList();
return ruleTypes.Where(type =>
interfaceList.Count > 0
? type.ImplementedInterfaces.Intersect(interfaceList).Any()
: type.ImplementedInterfaces.Any()
interfaceList.Count > 0 && type.ImplementedInterfaces.Intersect(interfaceList).Any()
);
}
var description = interfaces.FormatDescription(
"implement any interface",
"implement any of no interfaces (always false)",
"implement",
"implement any"
);
Expand Down Expand Up @@ -695,13 +693,12 @@ IEnumerable<T> Condition(IEnumerable<T> ruleTypes, Architecture architecture)
{
var interfaceList = interfaces.GetObjects(architecture).ToList();
return ruleTypes.Where(type =>
interfaceList.Count > 0
? !type.ImplementedInterfaces.Intersect(interfaceList).Any()
: !type.ImplementedInterfaces.Any()
interfaceList.Count <= 0
|| !type.ImplementedInterfaces.Intersect(interfaceList).Any()
);
}
var description = interfaces.FormatDescription(
"do not implement any interface",
"do not implement any of no interfaces (always true)",
"do not implement",
"do not implement any"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,203 +258,157 @@ Message:



===== Empty Arguments (No Violations) =====
===== Empty Arguments (Only Violations) =====

----- Conditions -----

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

----- Predicates -----

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

----- Predicates as conditions -----

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any interface
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

----- Complex conditions -----

Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are any of no objects (always empty)
Result: True
Description: InterfaceAssembly.IChildInterface passed
Message:
All Evaluations passed

===== Empty Arguments (Violations) =====

----- Conditions -----

Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface does not implement any interface
Result: False
Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface does not implement any interface
InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface does not implement any interface
Result: False
Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface does not implement any interface
InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface does not implement any interface
Result: False
Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interface" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface does not implement any interface
InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: False
Description: InterfaceAssembly.IBaseInterface does not implement any interface
Result: False
Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
InterfaceAssembly.IBaseInterface does not implement any interface
InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface



----- Predicates -----

Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any interface" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any interface
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false)
InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false)



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: False
Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: False
Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
InterfaceAssembly.IBaseInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"
InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"



----- Predicates as conditions -----

Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface does exist
Result: False
Description: InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
Description: InterfaceAssembly.IChildInterface does exist
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any interface" failed:
InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface does exist
InterfaceAssembly.IChildInterface does exist



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any interface
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)
Result: False
Description: InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
Description: InterfaceAssembly.IBaseInterface does exist
Result: False
Description: InterfaceAssembly.IChildInterface does exist
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any interface" failed:
InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)" failed:
InterfaceAssembly.IBaseInterface does exist
InterfaceAssembly.IChildInterface does exist



Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"
Result: False
Description: InterfaceAssembly.IBaseInterface does exist
Result: False
Description: InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
Description: InterfaceAssembly.IChildInterface does exist
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
InterfaceAssembly.IBaseInterface is not "InterfaceAssembly.IChildInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies"
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed:
InterfaceAssembly.IBaseInterface does exist
InterfaceAssembly.IChildInterface does exist



----- Complex conditions -----

Query: Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interfaces that are any of no objects (always empty)
Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any interfaces that are any of no objects (always empty)
Result: False
Description: InterfaceAssembly.IBaseInterface does not implement any interface
Result: False
Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface
Message:
"Interfaces that are "InterfaceAssembly.IBaseInterface" should implement any interfaces that are any of no objects (always empty)" failed:
"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any interfaces that are any of no objects (always empty)" failed:
InterfaceAssembly.IBaseInterface does not implement any interface
InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface



Expand Down
Loading
Loading