Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

*: code quality improvements #1199

Merged
merged 7 commits into from
Jul 29, 2019
Merged

*: code quality improvements #1199

merged 7 commits into from
Jul 29, 2019

Conversation

mcuadros
Copy link
Contributor

This PR's includes all the code quality improvements done by @muesli in several other PRs

Closes: #1182
Closes: #1183
Closes: #1184
Closes: #1185
Closes: #1186
Closes: #1187
Closes: #1188

- Use append instead of ranged for loop
- Simpler bool comparison

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 3918d0e)
- Added missing error handling around encodeCommitData and prevented shadowing
err.

- Removed tautological error checks.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 7d76176)
When we assign a value to err, make sure to also check for it being nil
afterwards. If those were intentionally unchecked, we should remove the
assignment in the first place. Those checks certainly never harm, but please
review thoroughly and let me know.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 19d6f42)
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 047bb4f)
Just a bit easier to read, in my opinion.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 91d314c)
No need to convert these values, they're already of the right type.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit a1d8a7a)
Since we don't check the value anyway, as it can't possibly be anything but nil.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 293e70f)
@mcuadros mcuadros merged commit d6c4b11 into master Jul 29, 2019
@muesli
Copy link
Contributor

muesli commented Jul 29, 2019

Thank you and sorry I didn't have the time to get around creating a new PR myself!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants