go-mod-outdated icon indicating copy to clipboard operation
go-mod-outdated copied to clipboard

Enable users to choose outdated dependency exit code

Open deleteriousEffect opened this issue 4 years ago • 3 comments

Currently, when this job fails in a CI job with an exit code of one, it's difficult to programmatically tell the difference between an outdated dependency and a failure caused by another reason.

This feature called --issues-exit-code, exists on golangci lint: https://golangci-lint.run/usage/configuration/ for example.

deleteriousEffect avatar Feb 22 '21 22:02 deleteriousEffect

thanks for you suggestion. It seems like a good use case, I think I will accept a PR for this.

psampaz avatar Mar 03 '21 18:03 psampaz

@psampaz awesome, I can write one up. Do you want this new flag to exist alongside the current ci flag?

deleteriousEffect avatar Mar 22 '21 21:03 deleteriousEffect

@deleteriousEffect if what you mean is that the new exit-code flag should require ci flag to be set, then no. Let's keep it simple. I suggest having the default flag value as 1 (as it is now https://github.com/psampaz/go-mod-outdated/blob/master/internal/runner/runner.go#L34) and only of someone wants a different value to actually set it.

psampaz avatar Mar 24 '21 07:03 psampaz