Skip to content

format temporary variables in loops in newline #70

@kdauer

Description

@kdauer

Problem to solve

As Squeak Developer, I want temporary variables set in a new line when I have a loop so that there is a better overview and I don't get confused with all the pipe chars |.

Further details

currently a do-loop with a temp var looks like this:

aNode elements do: [:element | | isLast |
			isLast := element = aNode elements last.

for a better overview the temp var should be in a newline like this

aNode elements do: [:element | 
                         | isLast |
			isLast := element = aNode elements last.

Acceptance Criteria

  • Given any method with a temp var in a block. When the method is formatted, then the temp var is set in a new line
  • The preference can be turned on and off in the poppyprint-preferences
  • Code Example:
aNode elements do: [:element | 
                         | isLast |
			isLast := element = aNode elements last.

Metadata

Metadata

Assignees

No one assigned

    Labels

    story 📚User stories are short, simple descriptions of a feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions