Might be related to the way data-tables are dealt with #812
Given this test:
import spock.lang.*
class TestSpec extends Specification {
@Unroll
def "Test downstream build"() {
given:
println 'nothing'
when:
println 'something'
then:
println 'nothing #DOWNSTREAM_STEP'
where:
DOWNSTREAM |DOWNSTREAM_STEP
[[job: "../some-job/some-branch",parameters: []]] | true
[
[job: "../some-job/master", parameters: [[stuff: "blah"]], wait: false ]] | true
[
[job: "../some-job/dev"]] | true
[
[job: "../some-job/master"],
[job: "../another-one/master"]] | true
[
[job: " ", parameters: "param", wait: true]] | false
[
[job: "", wait: true]] | false
null | false
}
}
The formatter will mangle the second part of the data-table into a new line:
import spock.lang.*
class TestSpec extends Specification {
@Unroll
def "Test downstream build"() {
given:
println 'nothing'
when:
println 'something'
then:
println 'nothing #DOWNSTREAM_STEP'
where:
DOWNSTREAM |DOWNSTREAM_STEP
[
[job: "../some-job/some-branch",parameters: []]]
| true
[
[job: "../some-job/master", parameters: [[stuff: "blah"]], wait: false ]]
| true
[
[job: "../some-job/dev"]]
| true
[
[job: "../some-job/master"],
[job: "../another-one/master"]]
| true
[
[job: " ", parameters: "param", wait: true]]
| false
[[job: "", wait: true]]| false
null | false
}
}
This causes things to not compile. I landed here from a bug I raised with spotless: diffplug/spotless#357
I've gotten around this by writing a custom formatter for spotless that basically re-stitches the lines back together (if a line starts with "|" after seeing a where clause)
Might be related to the way data-tables are dealt with #812
Given this test:
The formatter will mangle the second part of the data-table into a new line:
This causes things to not compile. I landed here from a bug I raised with spotless: diffplug/spotless#357
I've gotten around this by writing a
customformatter for spotless that basically re-stitches the lines back together (if a line starts with "|" after seeing awhereclause)