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

chore: Update golangci-lint to v1.57.1 #2929

Merged
merged 3 commits into from
Mar 24, 2024
Merged

chore: Update golangci-lint to v1.57.1 #2929

merged 3 commits into from
Mar 24, 2024

Conversation

gaby
Copy link
Member

@gaby gaby commented Mar 21, 2024

Description

Update golangci-lint to the latest release.

Changes introduced

List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.

  • Benchmarks: Describe any performance benchmarks and improvements related to the changes.
  • Documentation Update: Detail the updates made to the documentation and links to the changed files.
  • Changelog/What's New: Include a summary of the additions for the upcoming release notes.
  • Migration Guide: If necessary, provide a guide or steps for users to migrate their existing code to accommodate these changes.
  • API Alignment with Express: Explain how the changes align with the Express API.
  • API Longevity: Discuss the steps taken to ensure that the new or updated APIs are consistent and not prone to breaking changes.
  • Examples: Provide examples demonstrating the new features or changes in action.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to existing features and functionality)
  • Documentation update (changes to documentation)
  • Performance improvement (non-breaking change which improves efficiency)
  • Code consistency (non-breaking change which improves code reliability and robustness)

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.
  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Added or updated unit tests to validate the effectiveness of the changes or new features.
  • Ensured that new and existing unit tests pass locally with the changes.
  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.
  • Aimed for optimal performance with minimal allocations in the new code.
  • Provided benchmarks for the new code to analyze and improve upon.

Commit formatting

Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

Summary by CodeRabbit

  • Chores
    • Updated the linting tool to improve code quality checks.
  • Refactor
    • Removed unnecessary comments related to error wrapping in various test files to enhance code readability.

@gaby gaby requested a review from a team as a code owner March 21, 2024 13:23
@gaby gaby requested review from sixcolors, ReneWerner87 and efectn and removed request for a team March 21, 2024 13:23
Copy link
Contributor

coderabbitai bot commented Mar 21, 2024

Walkthrough

The changes in this update involve refining code quality by updating the .golangci.yml configuration file, removing unnecessary comments related to //nolint:wrapcheck, and adjusting comments in test files. Additionally, a comment related to error wrapping in tests was removed in one file.

Changes

File Path Change Summary
.golangci.yml Updated configuration to v1.57.1, adjusted skip settings, and added exclude directives.
client/core_test.go, client/helper_test.go, client/request_test.go Removed //nolint:wrapcheck comments from specific function calls.
listen_test.go, redirect_test.go Cleaned up comments related to error handling and linting directives.

Related issues

  • No related issues were found that directly align with the changes made in this update.

Poem

Among the code's intricate dance and play,
We refine it bit by bit, day by day.
🐰 Comments shed, linting rules align,
In the world of bytes, our code does shine.
Errors wrapped and directives clear,
Our codebase sings, without a tear.

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-tests 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 tests 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 tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@gaby
Copy link
Member Author

gaby commented Mar 21, 2024

@coderabbitai pause

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.75%. Comparing base (5e8df0a) to head (6c07d8c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2929   +/-   ##
=======================================
  Coverage   82.75%   82.75%           
=======================================
  Files         116      116           
  Lines        8396     8396           
=======================================
  Hits         6948     6948           
  Misses       1108     1108           
  Partials      340      340           
Flag Coverage Δ
unittests 82.75% <ø> (ø)

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.

@gaby
Copy link
Member Author

gaby commented Mar 21, 2024

Will fix the golangci-lint failures tonight.

Copy link
Contributor

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 7fa8b2d and 75cd714.
Files selected for processing (1)
  • .github/workflows/linter.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/linter.yml

Copy link
Contributor

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 75cd714 and 6c07d8c.
Files selected for processing (6)
  • .golangci.yml (2 hunks)
  • client/core_test.go (9 hunks)
  • client/helper_test.go (2 hunks)
  • client/request_test.go (3 hunks)
  • listen_test.go (1 hunks)
  • redirect_test.go (1 hunks)
Files skipped from review due to trivial changes (2)
  • client/core_test.go
  • client/request_test.go
Additional comments: 5
client/helper_test.go (2)
  • 65-65: Ensure that error handling in ts.ln.Dial() complies with the project's standards for error wrapping and handling.
  • 77-77: Ensure that error handling in ln.Dial() adheres to the project's error wrapping and handling guidelines.
.golangci.yml (1)
  • 255-256: Verify the intention behind excluding internal packages from issues processing. Ensure that critical issues within internal packages are not overlooked, especially if they affect public-facing functionality or security.
listen_test.go (1)
  • 1-1: Removing comments related to error wrapping in tests suggests a move towards stricter linting rules. Ensure that all test cases comply with the updated error handling standards.
redirect_test.go (1)
  • 2-7: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

Removing the nolint:wrapcheck directive from package documentation comments suggests a preference for stricter linting on error wrapping. Ensure that error handling in tests is consistent with the project's standards.

@ReneWerner87 ReneWerner87 added this to the v3 milestone Mar 24, 2024
@ReneWerner87 ReneWerner87 merged commit 3209052 into main Mar 24, 2024
14 of 15 checks passed
@efectn efectn deleted the bump-cilint branch May 22, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants