Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Fix deepsource woes #424

Merged
merged 12 commits into from Dec 28, 2020
Merged

Fix deepsource woes #424

merged 12 commits into from Dec 28, 2020

Conversation

maxice8
Copy link
Collaborator

@maxice8 maxice8 commented Dec 27, 2020

Description

Series of commits that fix several issues found by deepsource

Related Issue

https://github.com/profclems/glab/pull/423/checks?check_run_id=1614976446

How Has This Been Tested?

The changes should not change behaviour

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

Function literals that only call a single function, without making any
other changes to the value of the inner function, can be removed, as
they are redundant.

Instead, the inner function, that is being called inside the outer
function should be called.

https://deepsource.io/gh/profclems/glab/run/0801fe82-1e9c-42fd-acc7-affe7f2e2fbb/go/CRT-A0018/
From: https://golang.org/pkg/context/

Do not store Contexts inside a struct type; instead, pass a
Context explicitly to each function that needs it. The Context
should be the first parameter, typically named ctx

https://deepsource.io/gh/profclems/glab/run/0801fe82-1e9c-42fd-acc7-affe7f2e2fbb/go/RVV-A0002/
@profclems profclems merged commit 78bc1f4 into profclems:trunk Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants