Skip to content

[YUNIKORN-3345] Turn on nonamedreturns linter - #1129

Closed
PoiBlackTea wants to merge 1 commit into
apache:masterfrom
PoiBlackTea:YUNIKORN-3345
Closed

[YUNIKORN-3345] Turn on nonamedreturns linter#1129
PoiBlackTea wants to merge 1 commit into
apache:masterfrom
PoiBlackTea:YUNIKORN-3345

Conversation

@PoiBlackTea

Copy link
Copy Markdown
Contributor

Description

This PR turns on the nonamedreturns linter in .golangci.yml and refactors existing functions.

Type of change

Please delete options that are not relevant.

  • Bug Fix
  • Improvement
  • Feature
  • Refactoring
  • Documentation

Jira issue

Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3345

  • I have created a Jira issue for this pull request.
  • The Jira ID is part of the title of this pull request.

AI Tooling

If an AI tool was used:

  • The PR includes the phrase "Generated by Antigravity IDE", where Antigravity IDE is the name of the AI tool used.
  • My use of AI contributions follows the ASF legal policy.

Check https://www.apache.org/legal/generative-tooling.html for details.

How has this been tested?

  • New unit tests were added to cover new or changed code paths.
  • make test_all was run, and no failures reported.
  • A pull request will be opened for new e2e tests (apache/yunikorn-k8shim repository).

Questions:

  • The change needs documentation, a pull request for apache/yunikorn-site repository will be created.
  • There is breaking changes for older versions: jira is tagged with release-notes label.
  • The licenses files needs to be updated.

Screenshots or other details

N/A

Turn on nonamedreturns linter in .golangci.yml and refactor functions using named returns.
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.61%. Comparing base (ffab939) to head (f47638c).

Files with missing lines Patch % Lines
pkg/locking/locking.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1129   +/-   ##
=======================================
  Coverage   81.60%   81.61%           
=======================================
  Files         104      104           
  Lines       14251    14255    +4     
=======================================
+ Hits        11630    11634    +4     
  Misses       2331     2331           
  Partials      290      290           

☔ View full report in Codecov by Harness.
📢 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.

Comment thread pkg/scheduler/partition.go

@manirajv06 manirajv06 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

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.

3 participants