CQM-IncludeChaos

Duplicate includes

Required inputs: IR

A file should not contain duplicate includes.
Motivation

Redundant or superfluous imports/includes do not prevent a successful compile step. However, they make it harder to use import/include statements to grasp the context of a program fragment for a first semantic overview. The more often the imports/includes are redundant, superfluous or general, the less they help.

This rule is based on the CQM Quality Indicator: Importchaos (p. 216-219).

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

include_chaos

{include} is included multiple times.

None

False

Options