Skip to content

Conversation

@jsco2t
Copy link
Contributor

@jsco2t jsco2t commented Jul 10, 2025

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2025 22:54
@ciq-it-service-account
Copy link

ciq-it-service-account commented Jul 10, 2025

🎉 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)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 replaces fmt.Errorf calls.
  • Replaces strings.Replace with strings.ReplaceAll, simplifies fmt.Sprintf concatenations, and attempts to refactor loops using range.
  • 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 range is invalid. Use for 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 over ref.Elem().NumField().
	for i := range ref.Elem().NumField() {

pika_psql.go:1476

  • You can’t range over an int. To build the slice, use for idx := 0; idx < length; idx++ { ... }.
	for idx := range length {

pika_aip_filter_proto.go:56

  • fields.Len() returns an int; range cannot be used on it. Use for 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)/2 is an int, not a slice; range won't compile. Use a classic numeric loop instead.
				for i := range len(enumReverseSplit) / 2 {

@jsco2t jsco2t force-pushed the dependency-updates branch from d40a2b4 to 92e6a34 Compare July 14, 2025 21:49
@jsco2t jsco2t merged commit 9aa2c03 into main Jul 14, 2025
4 checks passed
@jsco2t jsco2t deleted the dependency-updates branch July 14, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants