Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Jun 3, 2025

Currently we're creating a local variable err which shadows the outer variable, so while we do still correctly go off the happy path in this case, the error we return does not include the underlying error message since we use the outer err variable which at this point will hold nil.

This was found by the nilnesserr linter which is a new linter included in v2 that "combines nilness and nilerr", and that I've enabled as part of this

@G-Rath G-Rath requested review from another-rex, cuixq and hogo6002 June 3, 2025 01:03
Copy link
Collaborator

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

Good catch! I think we should just swap the branches though to be more consistent.

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.67%. Comparing base (87a2039) to head (eba4115).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/datasource/maven_registry.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1919   +/-   ##
=======================================
  Coverage   65.66%   65.67%           
=======================================
  Files         166      166           
  Lines       16063    16064    +1     
=======================================
+ Hits        10548    10550    +2     
+ Misses       4849     4848    -1     
  Partials      666      666           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@G-Rath G-Rath force-pushed the linting/enable-nilnesserr branch from 0765795 to eba4115 Compare June 3, 2025 01:08
@another-rex another-rex enabled auto-merge (squash) June 3, 2025 01:13
@another-rex another-rex merged commit 9446e02 into google:main Jun 3, 2025
15 checks passed
@another-rex another-rex deleted the linting/enable-nilnesserr branch June 3, 2025 01:15
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.

4 participants