Reports any variable declarations which can be moved to a smaller scope. Especially useful for Pascal style declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.

Use the first checkbox below to only report variables that can be moved inside deeper code blocks.

Use the second checkbox below to report variables which are initialized with a new expression. This makes the inspection potentially unsafe in cases where the constructor has non-local side-effects.