Merged
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
There was a problem hiding this comment.
Pull Request Overview
This PR updates project-wide dependencies, license headers, and error handling, while refining string operations and loop constructs.
- Bumps license years and Go/protobuf/toolchain versions.
- Introduces static
Err…variables for standardized error wrapping and replacesfmt.Errorfcalls. - Replaces
strings.Replacewithstrings.ReplaceAll, simplifiesfmt.Sprintfconcatenations, and attempts to refactor loops usingrange. - Updates linter configuration and CI workflow (Go version & golangci-lint version).
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utils.go | Bumped header, added static errors, wrapped errors, use ReplaceAll |
| testproto/gen.go | Bumped license header |
| pika_psql_test.go | Bumped license header |
| pika_psql_experimental_test.go | Added license header |
| pika_psql_experimental.go | Added ErrIDNotFound, replaced error constructions |
| pika_psql.go | Bumped header, added Err… constants, refactored string ops & loops |
| pika_page_token.go | Bumped header, added bounds-check errors, updated PageToken logic |
| pika_aip_filter_psql_test.go | Bumped header, updated expected error message |
| pika_aip_filter_proto_test.go | Bumped header, updated expected error messages |
| pika_aip_filter_proto.go | Bumped header, added reflection helpers, refactored loops |
| pika_aip_filter.go | Bumped header, added static errors, wrapped error messages |
| pika.go | Bumped header, added Q and NewArgs helpers |
| parser/gen.go | Bumped header, updated go:generate comment |
| go.mod | Bumped Go version to 1.22, toolchain, updated protobuf version |
| .golangci.yml | Restructured config, bumped linter version, updated disable list |
| .github/workflows/test.yaml | Updated Go version to 1.22 and golangci-lint-action version |
Comments suppressed due to low confidence (8)
utils.go:315
- ref.NumField() returns an int, so
for i := range ref.NumField()is invalid; use a classic for-loop:for i := 0; i < ref.NumField(); i++ { ... }.
for i := range ref.NumField() {
pika_psql.go:1092
- Cannot range over an int; replace with
for i := 0; i < ref.NumField(); i++ {to iterate fields.
for i := range ref.NumField() {
pika_psql.go:1192
- ref.Elem().NumField() yields an int; using
rangeis invalid. Usefor i := 0; i < ref.Elem().NumField(); i++ {instead.
for i := range ref.Elem().NumField() {
pika_psql.go:1268
- Cannot iterate an integer with
range; switch back to a traditional index loop overref.Elem().NumField().
for i := range ref.Elem().NumField() {
pika_psql.go:1476
- You can’t
rangeover an int. To build the slice, usefor idx := 0; idx < length; idx++ { ... }.
for idx := range length {
pika_aip_filter_proto.go:56
- fields.Len() returns an int;
rangecannot be used on it. Usefor i := 0; i < fields.Len(); i++ {.
for i := range fields.Len() {
pika_aip_filter_proto.go:114
- fd.Enum().Values().Len() returns an int; switch to
for i := 0; i < fd.Enum().Values().Len(); i++ {.
for i := range fd.Enum().Values().Len() {
pika_aip_filter_proto.go:117
len(enumReverseSplit)/2is an int, not a slice;rangewon't compile. Use a classic numeric loop instead.
for i := range len(enumReverseSplit) / 2 {
d40a2b4 to
92e6a34
Compare
randyhongo
approved these changes
Jul 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.