Skip to content
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

feat: add golangci-lint version manager #3457

Merged
merged 44 commits into from
Dec 14, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 12, 2024

Changes

  • Updated goreleaser configuration to match repository standards
  • Added proper Docker build configuration with BuildKit support
  • Implemented cross-repo compatibility with go-findroot
  • Added codecov integration with 80% coverage target and proper ignore patterns
  • Fixed linting issues across all Go directories
  • Added proper file permission handling for Windows compatibility
  • Updated documentation in README.md and CONTRIBUTING.md
  • Implemented secure file operations with platform-specific permissions
  • Added proper error handling and path validation
  • Configured proper version management with .golangci-version

All Go directories have been processed with make lint and issues have been addressed.

Link to Devin run: https://app.devin.ai/sessions/b653ec7371fe4e23b271ff80d8d03ed3\n\nLink to Devin run: https://app.devin.ai/sessions/b653ec7371fe4e23b271ff80d8d03ed3

- Add .golangci-version file for version pinning
- Create golang-ci-lint tool for architecture-specific downloads
- Update make/go.Makefile to use pinned version
- Add caching mechanism for downloaded binaries
- Update documentation for new version management system

Co-Authored-By: [email protected] <[email protected]>
Copy link

cloudflare-workers-and-pages bot commented Dec 12, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5f25b5f
Status: ✅  Deploy successful!
Preview URL: https://c6b24c43.sanguine-fe.pages.dev
Branch Preview URL: https://devin-1734012084-add-golangc.sanguine-fe.pages.dev

View logs

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
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes in this pull request involve updates to the Go workflow configuration, the introduction of a new Golang CI Lint Version Manager, and enhancements to documentation files. The workflow modifications include dynamic version handling for golangci-lint and improved job execution conditions. Additionally, the .golangci-version file has been updated to specify a new version. Documentation in CONTRIBUTING.md, README.md, and a new README.md for the Golang CI Lint Version Manager has been added to clarify contribution processes and setup instructions.

Changes

File Change Summary
.github/workflows/go.yml Updated job definitions, added output variable golangci_version, modified steps for dynamic version handling.
.golangci-version Updated version to 1.56.2.
CONTRIBUTING.md Expanded PR submission guidelines, refined code coverage comments, clarified automated review tool usage, and updated linting instructions.
README.md Added "Go Development Setup" section, reorganized existing content, and elaborated on contribution workflows.
contrib/golang-ci-lint/README.md New documentation for the Golang CI Lint Version Manager, detailing its functionality and usage.
contrib/golang-ci-lint/go.mod New Go module declared with path github.com/synapsecns/sanguine/contrib/golang-ci-lint, specifying Go version 1.23.3.
contrib/golang-ci-lint/main.go Implemented command-line utility for downloading and installing golangci-lint, including error handling and binary extraction.
make/go.Makefile Modified lint target to use the new Golang CI Lint Version Manager for initiating linting process.

Possibly related PRs

  • [SLT-143] chore(ci): bump golangci-lint #3077: The changes in this PR involve updating the version of golangci-lint in the .github/workflows/go.yml file from v1.56.2 to v1.60.3, which is directly related to the updates made in the main PR that also modifies the golangci-lint version handling in the same workflow file.

Suggested labels

size/m, needs-go-generate-services/rfq

Suggested reviewers

  • dwasse
  • aureliusbtc

Poem

In the land of code where rabbits play,
New tools and guides come out to stay.
With linting made easy, oh what a thrill,
We hop through the changes, our hearts they fill.
So let's code together, in harmony bright,
With versions in check, our future is light! 🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added M-ci Module: CI go Pull requests that update Go code M-deps size/s labels Dec 12, 2024
@trajan0x
Copy link
Contributor

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions bot added size/m and removed size/s labels Dec 12, 2024
devin-ai-integration bot and others added 12 commits December 12, 2024 17:12
devin-ai-integration bot and others added 18 commits December 14, 2024 04:18
- Fix Docker build context for golang-ci-lint
- Update goreleaser configuration to match standards
- Add cross-repository support with go-findroot
- Ensure proper file permissions and Windows support
- Remove BuildKit dependency

Co-Authored-By: [email protected] <[email protected]>
- Restore .golangci-version with version 1.61.0
- Restore .golangci.yml configuration file
- Ensure version management functionality

Co-Authored-By: [email protected] <[email protected]>
… support

- Add .golangci-version file with version 1.61.0
- Implement cross-repository root detection using go-findroot
- Add Windows and Linux build support
- Configure Docker build with proper permissions
- Update documentation and Makefile integration

Co-Authored-By: [email protected] <[email protected]>
Copy link

codecov bot commented Dec 14, 2024

Codecov Report

Attention: Patch coverage is 6.96325% with 481 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@0847d81). Learn more about missing BASE report.
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
contrib/golang-ci-lint/main.go 6.17021% 434 Missing and 7 partials ⚠️
...rib/golang-ci-lint/permissions/permissions_unix.go 0.00000% 12 Missing ⚠️
contrib/golang-ci-lint/permissions/permissions.go 0.00000% 11 Missing ⚠️
tools/abigen/internal/etherscan/etherscan.go 0.00000% 6 Missing ⚠️
...rvices/explorer/graphql/server/graph/queryutils.go 0.00000% 3 Missing ⚠️
services/rfq/api/db/api_db.go 0.00000% 2 Missing ⚠️
services/rfq/relayer/inventory/circle.go 0.00000% 2 Missing ⚠️
services/rfq/relayer/inventory/synapse.go 0.00000% 2 Missing ⚠️
services/rfq/relayer/quoter/quoter.go 0.00000% 1 Missing ⚠️
services/rfq/relayer/relconfig/getters.go 0.00000% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master       #3457   +/-   ##
============================================
  Coverage          ?   13.09337%           
============================================
  Files             ?         373           
  Lines             ?       36950           
  Branches          ?           0           
============================================
  Hits              ?        4838           
  Misses            ?       31415           
  Partials          ?         697           
Flag Coverage Δ
cctp-relayer 31.97848% <ø> (?)
explorer 4.93656% <0.00000%> (?)
golang-ci-lint 5.88235% <5.88235%> (?)
opbot 0.18282% <ø> (?)
promexporter 6.81642% <ø> (?)
rfq 24.81538% <46.66667%> (?)
scribe 18.18182% <ø> (?)
tools 30.31250% <0.00000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trajan0x
Copy link
Contributor

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Dec 14, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@trajan0x trajan0x force-pushed the devin/1734012084-add-golangci-version-manager branch from 6a2f9aa to 5f25b5f Compare December 14, 2024 22:05
@trajan0x trajan0x merged commit 3511c73 into master Dec 14, 2024
72 checks passed
@trajan0x trajan0x deleted the devin/1734012084-add-golangci-version-manager branch December 14, 2024 22:13
@coderabbitai coderabbitai bot mentioned this pull request Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant