Skip to content

fix(staticcheck): Fix trivial go vet issues#3091

Merged
darccio merged 1 commit into
mainfrom
kakkoyun/fix_trivial_go_vet
Jan 16, 2025
Merged

fix(staticcheck): Fix trivial go vet issues#3091
darccio merged 1 commit into
mainfrom
kakkoyun/fix_trivial_go_vet

Conversation

@kakkoyun

Copy link
Copy Markdown
Member

Signed-off-by: Kemal Akkoyun [email protected]

What does this PR do?

This PR fixes triage issues in the codebase that has been identified by the go vet tool.

# gopkg.in/DataDog/dd-trace-go.v1/contrib/labstack/echo.v4
# [gopkg.in/DataDog/dd-trace-go.v1/contrib/labstack/echo.v4]
contrib/labstack/echo.v4/appsec_test.go:274:5: unreachable code
# gopkg.in/DataDog/dd-trace-go.v1/contrib/jackc/pgx.v5_test
# [gopkg.in/DataDog/dd-trace-go.v1/contrib/jackc/pgx.v5_test]
contrib/jackc/pgx.v5/example_test.go:48:1: ExamplePool refers to unknown identifier: Pool
# gopkg.in/DataDog/dd-trace-go.v1/internal
# [gopkg.in/DataDog/dd-trace-go.v1/internal]
internal/utils_test.go:29:7: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@kakkoyun
kakkoyun requested review from a team as code owners January 16, 2025 12:01
@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label Jan 16, 2025
@datadog-datadog-prod-us1

Copy link
Copy Markdown

Datadog Report

Branch report: kakkoyun/fix_trivial_go_vet
Commit report: 251e0fb
Test service: dd-trace-go

✅ 0 Failed, 5174 Passed, 71 Skipped, 2m 35.37s Total Time

@darccio darccio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darccio
darccio merged commit c27f098 into main Jan 16, 2025
@darccio
darccio deleted the kakkoyun/fix_trivial_go_vet branch January 16, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants