Merge pull request #374 from Eliyahu-Ravuna/patch-19

Enforcement rule for I.3: Avoid singletons
This commit is contained in:
Gabriel Dos Reis 2015-11-02 12:13:24 -08:00
commit 99519e8971

View File

@ -1042,6 +1042,7 @@ Very hard in general.
* Look for classes with names that include `singleton`.
* Look for classes for which only a single object is created (by counting objects or by examining constructors).
* If a class X has a public static function that contains a function-local static of the class' type X and returns a pointer or reference to it, ban that.
### <a name="Ri-typed"></a> I.4: Make interfaces precisely and strongly typed