Skip to content

Conversation

@bupd
Copy link
Contributor

@bupd bupd commented Dec 23, 2025

Comprehensive Summary of your change

Add style linters to enforce consistency:

  • usestdlibvars - Enforces stdlib constants (eg http.MethodGet, http.StatusOK)
  • dupl - Detects duplicate code blocks (threshold: 300 tokens)
  • Set dupl threshold to 300 tokens to avoid false positives
  • Fixed usestdlibvars violations (replaced literals with constants)
  • Added revive exclusion for var-naming in existing packages

Issue being fixed

Fixes #22665

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/update"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@bupd bupd requested a review from a team as a code owner December 23, 2025 00:39
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.85%. Comparing base (c8c11b4) to head (53e40b8).
⚠️ Report is 611 commits behind head on main.

Files with missing lines Patch % Lines
src/pkg/oidc/helper.go 0.00% 1 Missing ⚠️
src/pkg/reg/adapter/huawei/huawei_adapter.go 66.66% 1 Missing ⚠️
src/server/v2.0/handler/search.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22670       +/-   ##
===========================================
+ Coverage   45.36%   65.85%   +20.48%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116095   +102762     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76457    +70408     
- Misses       6983    35400    +28417     
- Partials      301     4238     +3937     
Flag Coverage Δ
unittests 65.85% <70.00%> (+20.48%) ⬆️

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

Files with missing lines Coverage Δ
src/pkg/reg/adapter/huawei/image_registry.go 58.49% <100.00%> (ø)
src/server/registry/referrers.go 61.15% <100.00%> (ø)
src/pkg/oidc/helper.go 43.34% <0.00%> (ø)
src/pkg/reg/adapter/huawei/huawei_adapter.go 54.72% <66.66%> (ø)
src/server/v2.0/handler/search.go 0.00% <0.00%> (ø)

... and 982 files with indirect coverage changes

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

bupd added 3 commits December 23, 2025 06:33
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
@bupd bupd force-pushed the lint/style-duplication branch from 54f1c9c to 53e40b8 Compare December 23, 2025 01:04
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.

Add more linters to catch bugs earlier

4 participants