org.sonar.l10n.delphi.rules.community-delphi.UnitLevelKeywordIndentation.html Maven / Gradle / Ivy
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