Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.17 KB

AlignAliasesForRule.md

File metadata and controls

70 lines (49 loc) · 2.17 KB

<-- previous rule | overview | next rule -->

Align ALIASES ... FOR ...

Aligns consecutive ALIASES ... FOR ... declarations.

Options

  • Align across empty lines
  • Align across comment lines

Examples

  " comment on first group of aliases
  ALIASES medium_method_name
    FOR if_any_interface~medium_method_name.
  ALIASES short_name
    FOR if_any_interface~short_name.
  ALIASES extra_long_method_name
    FOR if_any_interface~extra_long_method_name.

  " comment on first group of aliases
  ALIASES any_method_name
    FOR if_other_interface~any_method_name.
  ALIASES other_method_name
    FOR if_other_interface~other_method_name.

  ALIASES create
    FOR if_other_interface~create.

  " chains are aligned independently:
  ALIASES:
    first_method_name
      FOR if_yet_another_interface~first_method_name,
    second_method_name
      FOR if_yet_another_interface~second_method_name,
    last_method_name
      FOR if_yet_another_interface~last_method_name.

Resulting code:

  " comment on first group of aliases
  ALIASES medium_method_name     FOR if_any_interface~medium_method_name.
  ALIASES short_name             FOR if_any_interface~short_name.
  ALIASES extra_long_method_name FOR if_any_interface~extra_long_method_name.

  " comment on first group of aliases
  ALIASES any_method_name        FOR if_other_interface~any_method_name.
  ALIASES other_method_name      FOR if_other_interface~other_method_name.

  ALIASES create                 FOR if_other_interface~create.

  " chains are aligned independently:
  ALIASES: first_method_name  FOR if_yet_another_interface~first_method_name,
           second_method_name FOR if_yet_another_interface~second_method_name,
           last_method_name   FOR if_yet_another_interface~last_method_name.

Related code