Skip to content

Fix linting issues in staging branch #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix linting issues in staging branch

This PR fixes several linting issues detected by golangci-lint:

  1. Fixed Task struct field access in model/task.go by accessing fields through the embedded Task struct.
  2. Added missing types in composite literals in pkg/erc4337/userop/object.go and pkg/erc4337/preset/builder.go.
  3. Fixed range over constant error in core/taskengine/engine_test.go.
  4. Fixed protojson.Marshal usage with *Task in model/task.go.

Link to Devin run: https://app.devin.ai/sessions/8779c91a69c049c28706e937cb852d29
Requested by: Chris Li (chris@avaprotocol.org)

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor

@Copilot 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 fixes several linting issues in the staging branch. The changes include standardizing import alias usage, correcting field accesses through the embedded Task struct, updating composite literal syntax in ABI argument definitions, and adding environment variable checks in tests alongside a corrected range loop.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/erc4337/userop/parse.go Standardized the import alias for the validator package.
pkg/erc4337/userop/object.go Updated composite literal syntax for ABI arguments to fix linting warnings.
pkg/erc4337/preset/builder_test.go Added environment variable checks to skip tests and ensured proper test logging.
pkg/erc4337/preset/builder.go Standardized the import alias for the ethereum package.
operator/worker_loop.go & operator/operator.go Standardized the import alias for the gocron package.
model/task.go Adjusted Task struct field accesses to use the embedded Task for protojson marshaling.
core/taskengine/* Fixed range iteration and standardized import alias usages across various test and engine files.

…ld access

Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
Co-Authored-By: Chris Li <chris.li.2046@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant