Skip to content

Fix linter issues

Zubeen requested to merge syedzubeen/gitlab:syedzubeen-master-patch-5881 into master
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Fixes generic linter issues reported by golangci-lint.

Issue1: png/reader.go:78:17: var-declaration: should omit type []byte from declaration of var magicBytes; it will be inferred from the right-hand side (revive) var magicBytes []byte = make([]byte, pngMagicLen)

Issue2: png/reader.go:1:1: package-comments: should have a package comment (revive) package png

Issue3: gitaly_test.go:536:17: string e395f646b1499e8e0279445fc99a0596a65fab7e has 4 occurrences, make it a constant (goconst) rightCommit := "e395f646b1499e8e0279445fc99a0596a65fab7e"

Issue 4: gitaly_test.go:576:9: string 54fcc214b94e78d7a41a9a8fe6d87a5e59500e51 has 3 occurrences, make it a constant (goconst) oid := "54fcc214b94e78d7a41a9a8fe6d87a5e59500e51"

Issue5: gitaly_test.go:537:16: string 8a0f2ee90d940bfb0ba1e14e8214b0649056e4ab has 4 occurrences, make it a constant (goconst) leftCommit := "8a0f2ee90d940bfb0ba1e14e8214b0649056e4ab"

Issue 6: gitaly_integration_test.go:252:21: string repo-1 has 4 occurrences, make it a constant (goconst) archivePrefix := "repo-1"

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Zubeen

Merge request reports