Eyeshot 12 (analysis done Today 14:28 most recent)
WARNING: This code rule is violated. 5 types on 3178 tested match the condition.
// <Name>API Breaking Changes: Interfaces and Abstract Classes</Name>
warnif count > 0 from tNewer in Application.Types where
(tNewer.IsInterface || tNewer.IsClass && tNewer.IsAbstract) &&
tNewer.IsPubliclyVisible &&
tNewer.IsPresentInBothBuilds()
let tOlder = tNewer.OlderVersion() where tOlder.IsPubliclyVisible
let methodsRemoved = tOlder.Methods.Where(m => m.IsAbstract && m.WasRemoved())
let methodsAdded = tNewer.Methods.Where(m => m.IsAbstract && m.WasAdded())
where methodsAdded.Count() > 0 || methodsRemoved.Count() > 0
select new {
tNewer,
methodsAdded,
methodsRemoved,
Severity = Severity.High
}
//<Description>
// This rule is executed only if a *baseline for comparison* is defined (*diff mode*).
//
// This rule warns if a publicly visible interface or abstract class
// has been changed and contains new abstract methods or
// if some abstract methods have been removed.
//
// Clients code that implement such interface or derive from
// such abstract class will be broken.
//</Description>
//<HowToFix>
// Make sure that the public contracts of interfaces and abstract classes
// that used to be presented to clients, remain stable now, and in the future.
//
// If a public contract must really be changed, you can tag
// abstract methods that will be removed with *System.ObsoleteAttribute*
// with a *workaround message* during a few public releases, until it gets
// removed definitely.
//
// Issues of this rule have a severity equal to **High**
// because an API Breaking change can provoque significant
// friction with consummers of the API.
// The severity is not set to **Critical** because an interface
// is not necessarily meant to be implemented by the consummer
// of the API.
//</HowToFix>
5 types | methodsAdded | methodsRemoved | Severity | Full Name |
BarBase | 3 methods | 3 methods | High | devDept.Eyeshot.BarBase |
IIfcEntity | 2 methods | no method | High | devDept.Eyeshot.Translators.IIfcEntity |
Dimension | 1 method | 1 method | High | devDept.Eyeshot.Entities.Dimension |
Entity | 1 method | 1 method | High | devDept.Eyeshot.Entities.Entity |
ICurve | 7 methods | 7 methods | High | devDept.Eyeshot.Entities.ICurve |
Sum: | 14 | 12 | - | |
Average: | 2.8 | 2.4 | - | |
Minimum: | 1 | 0 | - | |
Maximum: | 7 | 7 | - | |
Standard deviation: | 2.23 | 2.5 | - | |
Variance: | 4.96 | 6.24 | - | |