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

*: replace exportloopref with copyloopvar #56503

Merged
merged 19 commits into from
Oct 9, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Oct 9, 2024

What problem does this PR solve?

Issue Number: close #56509

Problem Summary:

What changed and how does it work?

The linter 'exportloopref' is deprecated due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.

  • exportloopref -> copyloopvar
  • disable noloopclosure
  • disable loopclosure
  • disable RangeValInClosureRule in revive
  • disable RangeValAddress in revive

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Oct 9, 2024
@hawkingrei hawkingrei added skip-issue-check Indicates that a PR no need to check linked issue. do-not-merge/needs-tests-checked labels Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.0536%. Comparing base (8c4bab1) to head (443f788).
Report is 8 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56503        +/-   ##
================================================
+ Coverage   73.4004%   76.0536%   +2.6531%     
================================================
  Files          1626       1648        +22     
  Lines        448838     457029      +8191     
================================================
+ Hits         329449     347587     +18138     
+ Misses        99185      87782     -11403     
- Partials      20204      21660      +1456     
Flag Coverage Δ
integration 51.8187% <50.0000%> (?)
unit 72.4695% <100.0000%> (-0.0332%) ⬇️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.0180% <100.0000%> (+17.4260%) ⬆️

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 9, 2024
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei hawkingrei requested a review from lance6716 October 9, 2024 09:15
@hawkingrei hawkingrei removed the skip-issue-check Indicates that a PR no need to check linked issue. label Oct 9, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 9, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 9, 2024
Copy link

ti-chi-bot bot commented Oct 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-09 09:20:33.727093145 +0000 UTC m=+1037789.147306157: ☑️ agreed by Defined2014.
  • 2024-10-09 09:23:57.525605273 +0000 UTC m=+1037992.945818282: ☑️ agreed by lance6716.

Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot bot added the approved label Oct 9, 2024
@hawkingrei
Copy link
Member Author

/retest

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Copy link

ti-chi-bot bot commented Oct 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, Defined2014, lance6716, windtalker, XuHuaiyu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit c43d058 into pingcap:master Oct 9, 2024
29 checks passed
@hawkingrei hawkingrei deleted the exportlooperf branch October 9, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace exportloopref with copyloopvar
6 participants