CodeQL library for C#
codeql/csharp-all 0.8.11-dev (changelog, source)
Search

Member predicate ValueOrRefType::getLackOfCohesionHS

Gets the Henderson-Sellers lack of cohesion metric.

This is defined as (r-M)/(1-M), where M is the total number of methods in this class, and r is the average number of methods that access each field in this type.

Types with a high Henderson-Sellers metric have methods which access many fields, and can be a maintainability problem.

float getLackOfCohesionHS()