Unused Imports

Definition:

  • An import from another module is never used.

Code Example:

 module Foo {
   const charstr ing FOO CONST := " foo " ;
 }

 module Bar {
   const charstr ing BAR CONST := " bar " ;
 }

module Baz {
 import from Foo all;
 import from Bar 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