Regarding CI: Which shell does Woodpecker run with? Is it maybe not bash and thus not properly parsing the brackets / logic?
The issue is with the last line in the current .woodpecker.yml.
It has got nothing to do with the choice of shell. You can easily test it in your own shell by replacing $(gofumpt -extra -l . | wc -l) with echo 0 or echo 1 respectively.
The issue lies in the exit/return code evaluated by the shell:
If the output of wc -l is 0, this would lead to an exit code of 0 for the test. The result of the || would be true already. Thus the rest of the line is not interpreted anymore.
If the output of wc -l is 1, that would lead to the exit code of 1 for the test. This is interpreted as false in the following ||. The expression can only become true if the next command evaluates to true. Thus it is executed and leads to an exit code of 1 (because of the call to "exit 1" - btw. you could also call "false" to achieve the result). Either way the result code would be 1 and this would fail the CI-test.