Unrestricted Imports

Definition:

  • A module imports more from another module than needed.

Code Example:

 module Foo {
   group groupConstants {
   const charstr ing FOO CONST := " foo " ;
     // some other constants . . .
   }

   group groupTypes {
     // type definitions . . .
   }

   group groupComponents {
     // component definitions . . .
   }
 }

module Baz {
 import from Foo all;

 function f ( in charstring s ) return boolean {
   if (FOO_CONST == s ) {
     return true;
   }

   return false;
 }
}

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring