Open tisto opened 6 years ago
As long as it is on a major version bump, I'm fine 👍
Ok, I forgot one nifty detail. Returning the status code breaks the code-analysis call. When "bin/code-analysis" fails within the pre-commit hook, the dev can not commit anything. This is incredibly annoying. So if we want to simplify this, we need our pre-commit hook to work around the exit status of "bin/code-analysis".
Ok, I just checked. This should work if we change the pre-commit hook to:
#!/usr/bin/env bash
bin/code-analysis || true
I guess this is safe because nobody needs an exit status from a pre-commit hook anyways. This is just something on the dev machines.
The main reason why return-status-codes is set to false by default was Jenkins. Traditional Jenkins jobs fail if a process exits with 1. With the new declarative pipeline syntax this is not true any longer. Jenkins requires the process to fail with exit code 1 just like Travis and other CI systems.
Therefore I think we can simplify the configuration by setting return-status-codes to True (by default). This would be a breaking change and require a major version step though. Opinions?