Skip to content

Inconsistent output from wdltools format #215

Description

@wholtz

I'm trying to use wdltools format in continuous integration testing, in order to verify that the WDL file has been properly formatted. I've noticed that the output of

wdltools format test.wdl

generates a trailing newline, while

wdltools format --overwrite test.wdl

does not generate a file with a trailing newline. I would like to see the wdltools format output be independent of the --overwrite flag setting.

$ wdltools format --overwrite test.wdl
$ diff test.wdl <(wdltools format test.wdl)
0a1
> test.wdl
22c23
< }
\ No newline at end of file
---
> }
$ cat test.wdl
version 1.0

workflow my_workflow {
  input {
    String message
  }

  call display {
    input:
      message = message
  }
}

task display {
  input {
    String message
  }

  command <<<
    printf '~{message}'
  >>>
}$ wdltools format test.wdl
test.wdl
version 1.0

workflow my_workflow {
  input {
    String message
  }

  call display {
    input:
      message = message
  }
}

task display {
  input {
    String message
  }

  command <<<
    printf '~{message}'
  >>>
}
$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions