All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.delphi.rules.community-delphi.UnitLevelKeywordIndentation.html Maven / Gradle / Ivy

There is a newer version: 1.12.1
Show newest version

Why is this an issue?

In Delphi, indentation is an indicator of scope. Following this, top-level keywords and elements should never be indented, as it allows the structure of a unit to be read immediately at a glance.

Top level elements include:

  • The file heading (unit, program, package, and library)
  • Section headings (interface, implementation, initialization, finalization)
  • Uses clauses (uses)
  • Top-level type, var, and const sections
  • Top-level begin and end
  • Top-level routine declarations
  • Routine implementations

How to fix it

Remove all indentation before the beginning keyword of the top-level element.

Resources





© 2015 - 2024 Weber Informatics LLC | Privacy Policy