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

linter, *: enable linters appends and unusedwrite #52452

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Apr 9, 2024

What problem does this PR solve?

Issue Number: close #52450, ref #52449

Problem Summary:

Enable two linters: appends and unusedwrite.

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.
      Simple syntax change. They should already be covered by existing test.

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 release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 9, 2024
@YangKeao YangKeao requested review from lance6716 and hawkingrei April 9, 2024 08:56
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 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 Apr 9, 2024
Copy link

ti-chi-bot bot commented Apr 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-09 08:58:32.679443473 +0000 UTC m=+952774.206984015: ☑️ agreed by lance6716.
  • 2024-04-09 09:01:43.249552651 +0000 UTC m=+952964.777093197: ☑️ agreed by hawkingrei.

Copy link

codecov bot commented Apr 9, 2024

Codecov Report

Merging #52452 (8d3e4d4) into master (1cec66b) will increase coverage by 3.4864%.
Report is 33 commits behind head on master.
The diff coverage is 16.6666%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52452        +/-   ##
================================================
+ Coverage   72.1268%   75.6133%   +3.4864%     
================================================
  Files          1467       1489        +22     
  Lines        426791     443062     +16271     
================================================
+ Hits         307831     335014     +27183     
+ Misses        99720      87064     -12656     
- Partials      19240      20984      +1744     
Flag Coverage Δ
integration 52.0941% <8.3333%> (?)
unit 71.2578% <16.6666%> (+0.2605%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 61.7885% <ø> (+20.9361%) ⬆️

@hawkingrei
Copy link
Member

/retest

2 similar comments
@hawkingrei
Copy link
Member

/retest

@hawkingrei
Copy link
Member

/retest


// construct table t2 without partition.
t2 := model.TableInfo{
ID: tableID2,
Name: model.NewCIStr(tableName2),
}
db2 := model.DBInfo{
ID: dbID2,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove this ID?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it's not used in this test 🤔 .

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, that test passes. I guess this will probably be fine.

@YangKeao YangKeao requested a review from YuJuncen April 10, 2024 05:51
@easonn7
Copy link

easonn7 commented Apr 10, 2024

/approve

Copy link

ti-chi-bot bot commented Apr 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: easonn7, hawkingrei, lance6716, YuJuncen, zimulala

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 added the approved label Apr 10, 2024
@YangKeao
Copy link
Member Author

/test pull-lightning-integration-test

Copy link

tiprow bot commented Apr 10, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-lightning-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 8188ede into pingcap:master Apr 10, 2024
33 of 45 checks passed
3AceShowHand pushed a commit to 3AceShowHand/tidb that referenced this pull request Apr 16, 2024
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. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable unusedwrite and appends linter
6 participants