Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: Add support for go1.23 and golangci-lint v1.60.1 #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gaby
Copy link
Member

@gaby gaby commented Aug 17, 2024

  • Bump minimum go version to 1.22
  • Bump golangci-lint to v1.60.1
    • Fix all issues exposed by golangci-lint
  • Add go1.23 to CI
  • macos-latest now points to arm-based MacOS14.
  • re-added macos-13 which is x86_64 based.

Summary by CodeRabbit

  • New Features

    • Upgraded to Go version 1.22.x and 1.23.x across testing workflows for improved performance and features.
    • Updated GolangCI-Lint tool to version 1.60.1, enhancing linting capabilities.
  • Bug Fixes

    • Improved clarity in test assertions to ensure more intuitive verification of results.
  • Documentation

    • Enhanced URL formatting in the README for better readability.

@gaby gaby requested a review from a team as a code owner August 17, 2024 14:04
@gaby gaby requested review from sixcolors, ReneWerner87 and efectn and removed request for a team August 17, 2024 14:04
Copy link

coderabbitai bot commented Aug 17, 2024

Walkthrough

This update primarily involves upgrading the Go programming language version from 1.21.x to 1.22.x and subsequently to 1.23.x across various GitHub Actions workflows. Additionally, the GolangCI-Lint tool version is updated to v1.60.1. Minor changes in a test case improve clarity, while documentation formatting in the README enhances link readability. These modifications collectively aim to enhance performance, code quality, and maintainability.

Changes

Files Change Summary
.github/workflows/*.yml Upgraded Go version from 1.21.x to 1.22.x and then to 1.23.x. Updated GolangCI-Lint from v1.59.1 to v1.60.1.
Makefile Updated golangci-lint command version from v1.59.1 to v1.60.1.
README.md Improved URL formatting for better readability.
convert_test.go Changed assertion in TestCopyBytes from checking length to checking slice content for improved clarity.

Poem

🐇 In a world of code, so bright and new,
Versions updated, like morning dew.
Go leaps ahead, with linting in tow,
Testing and docs, all set to glow!
Hooray for the changes, we hop and cheer,
For cleaner code and tools we hold dear! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Copy link

codecov bot commented Aug 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.48%. Comparing base (cefa447) to head (10b7b78).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #92   +/-   ##
=======================================
  Coverage   92.48%   92.48%           
=======================================
  Files           9        9           
  Lines         399      399           
=======================================
  Hits          369      369           
  Misses         17       17           
  Partials       13       13           
Flag Coverage Δ
unittests 92.48% <ø> (ø)

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cefa447 and 10b7b78.

Files ignored due to path filters (1)
  • go.mod is excluded by !**/*.mod
Files selected for processing (6)
  • .github/workflows/benchmark.yml (1 hunks)
  • .github/workflows/linter.yml (1 hunks)
  • .github/workflows/test.yml (2 hunks)
  • Makefile (1 hunks)
  • README.md (1 hunks)
  • convert_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • README.md
Additional comments not posted (8)
.github/workflows/linter.yml (2)

36-36: Update Go version to 1.22.x.

The Go version has been updated to 1.22.x. Ensure that all code and dependencies are compatible with this version.


43-43: Update GolangCI-Lint version to v1.60.1.

The GolangCI-Lint version has been updated to v1.60.1. This may introduce new linting rules or improvements.

Makefile (1)

34-34: Update GolangCI-Lint version in Makefile.

The GolangCI-Lint version in the Makefile has been updated to v1.60.1. Ensure that the updated version is compatible with your codebase.

.github/workflows/test.yml (3)

21-21: Update Go versions in the build matrix.

The Go versions have been updated to 1.22.x and 1.23.x in the build matrix. This ensures compatibility with newer Go features and improvements.


22-22: Adjust platform specifications in the build matrix.

The platform list now includes macos-13. Ensure compatibility with this macOS version for testing.


43-43: Conditional coverage report upload for Go 1.23.x.

The coverage reports are now uploaded only for Go version 1.23.x on the ubuntu-latest platform. Ensure that this aligns with your testing and reporting strategy.

.github/workflows/benchmark.yml (1)

29-29: Ensure Go version compatibility.

The Go version has been updated to 1.22.x. Ensure that all dependencies and code are compatible with this version. Additionally, verify that the version in go.mod is consistent with this update.

Verification successful

Go version consistency verified.

The Go version specified in go.mod is consistent with the version used in the GitHub Actions workflow. Please ensure that all dependencies and code are compatible with Go 1.22 through testing or other verification methods.

  • Verified Go version in go.mod: 1.22
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the Go version in go.mod is consistent with the workflow configuration.

# Test: Search for the Go version in go.mod. Expect: Version 1.22.
rg --type go '^go 1.22' go.mod

Length of output: 40

convert_test.go (1)

194-194: Improved clarity in slice emptiness check.

The assertion has been updated to directly check if the slice is empty, enhancing the clarity of the test case. This change is appropriate and aligns with best practices for testing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant