Skip to content

Formatter ignores indent for if, for, while expressions #1221

@rabits

Description

@rabits

Hello folks,

I use groovy-eclipse through spotless and during scan found it don't like the multiline expression blocks:

  • Example-orig.groovy
    def   call() {
      if( true
          && true
          && false) {
        println('test')
      }
    }
    
  • Example-processed.groovy
    def   call() {
      if( true
      && true
      && false) {
        println('test')
      }
    }
    

So the expression for some reason gets the same indent as "if".

Also I noticed that by default it's not removing duplicated spaces (def call) and I found no params to control that.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions