CQM-GenerationalConflict¶
A subclass should not reject most of the routines inherited from its superclass
Required inputs: IR
Most of the routines inherited from a direct superclass are overridden non-empty by the subclass and the overriding routines do not use their superclass counterpart.
Motivation
The already difficult form of inheritance for source code sharing is further exacerbated in generation conflict by completely reimplementing a large portion of the inherited methods. The semantic similarity of the method can thus no longer be ensured in any way. This problem is still aggravated by the fact that only cases are considered here in which the superclass method is not used and/or called. A type hierarchy can generally no longer be realized in this way.
This rule is based on the CQM Quality Indicator: Generationskonflikt (p. 189-191).
Reference
Simon, Frank/ Seng, Olaf/ Mohaupt, Thomas (2006): Code-Quality-Management: Technische Qualität industrieller Softwaresysteme transparent und vergleichbar gemacht, 1st ed., Heidelberg, Germany: dpunkt.verlag GmbH.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
generational_conflict |
This subclass overrides {per} of the virtual routines it inherits ({num} out of {all}). |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
max_percentage_overrides¶
max_percentage_overrides : float = 50.0