Closed graebm closed 9 months ago
Attention: 5 lines
in your changes are missing coverage. Please review.
Comparison is base (
7f55a9c
) 83.23% compared to head (fbb4e2d
) 83.15%.
Files | Patch % | Lines |
---|---|---|
source/json.c | 0.00% | 2 Missing :warning: |
source/logging.c | 0.00% | 2 Missing :warning: |
source/log_formatter.c | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Our error handling strategy is simple to explain, but easy to get wrong. Inspired by this PR that fixed some obviously-incorrect-code, I decided to search for more easy-to-spot accidents:
return AWS_(?!OP_)
: look for places we accidentally return error codes, instead of raising themAWS_ERROR_SUCCESS
: look for places we misuse AWS_ERROR_SUCCESS, returning it instead of AWS_OP_SUCCESS. This doesn't cause bugs (they're both 0) but it's not right either.return AWS_OP_ERR
: Look for places we return AWS_OP_ERR without an error having been raised beforehand. I found A LOT of these mistakes, but I'm sure there are more.TODO in the future:
return NULL
(there are 1500+ of these)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.