Skip to content

[improvement] Refactor code blocks ignored by errorlint#370

Merged
rahulait merged 7 commits intomainfrom
errorlint-fixes
Apr 15, 2025
Merged

[improvement] Refactor code blocks ignored by errorlint#370
rahulait merged 7 commits intomainfrom
errorlint-fixes

Conversation

@Andrews2024
Copy link
Copy Markdown
Contributor

@Andrews2024 Andrews2024 commented Apr 11, 2025

General:

As mentioned in PR 349, several errorlint errors were ignored because attempting to fix them resulted in two chainsaw tests breaking. This PR resolves the errorlint errors so we avoid issues with wrapped errors.

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Are you addressing a single feature in this PR?
  3. Are your commits atomic, addressing one change per commit?
  4. Are you following the conventions of the language?
  5. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  6. Have you explained your rationale for why this feature is needed?

@github-actions github-actions Bot added the improvement for improvements in existing functionality in the changelog. label Apr 11, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 41.07143% with 33 lines in your changes missing coverage. Please review.

Project coverage is 73.15%. Comparing base (ac5a2b5) to head (5b42bbb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cloud/linode/loadbalancers.go 36.36% 23 Missing and 5 partials ⚠️
cloud/linode/service_controller.go 16.66% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
- Coverage   73.48%   73.15%   -0.34%     
==========================================
  Files          15       15              
  Lines        2682     2675       -7     
==========================================
- Hits         1971     1957      -14     
- Misses        544      547       +3     
- Partials      167      171       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Andrews2024 Andrews2024 changed the title [improvement] WIP: Swapped linodego.Error blocks for errors.As() [improvement] WIP: Refactor code blocks ignored by errorlint Apr 11, 2025
@Andrews2024 Andrews2024 changed the title [improvement] WIP: Refactor code blocks ignored by errorlint [improvement] Refactor code blocks ignored by errorlint Apr 11, 2025
@Andrews2024 Andrews2024 marked this pull request as ready for review April 11, 2025 19:30
Comment thread cloud/linode/node_controller.go
@rahulait rahulait merged commit 51d4a37 into main Apr 15, 2025
7 of 9 checks passed
@Andrews2024 Andrews2024 deleted the errorlint-fixes branch April 16, 2025 13:17
hcwagner pushed a commit to hcwagner/linode-cloud-controller-manager that referenced this pull request Jun 11, 2025
* Swapped linodego.Error blocks for errors.As()

* Swapped switch cases for lbNotFoundError blocks with errors.As()

* WIP: Fix unit test results

* Finished resolving unit test failures

* WIP: EnsureLoadBalancerDeleted targetError as non-pointer

* Added default case that got removed

---------

Co-authored-by: Rahul Sharma <rahulait@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants