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

Fix non-constant format strings #824

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Nov 22, 2024

Follow-up for #813

$ make GO=gotip build
gotip version
go version devel go1.24-4865aadc Fri Nov 22 05:22:24 2024 +0000 linux/amd64
gofmt (simplify)
vet
dump_region/main.go:59:14: non-constant format string in call to fmt.Printf
pkg/check/privilege.go:146:51: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
pkg/check/table_structure.go:130:19: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
pkg/check/table_structure.go:136:19: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
importer/config.go:73:14: non-constant format string in call to fmt.Printf
make: *** [Makefile:86: check] Error 1

Related: golang/go#60529

What problem does this PR solve?

Issue Number: ref #813

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

```
$ make GO=gotip build
gotip version
go version devel go1.24-4865aadc Fri Nov 22 05:22:24 2024 +0000 linux/amd64
gofmt (simplify)
vet
dump_region/main.go:59:14: non-constant format string in call to fmt.Printf
pkg/check/privilege.go:146:51: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
pkg/check/table_structure.go:130:19: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
pkg/check/table_structure.go:136:19: non-constant format string in call to github.com/pingcap/tidb-tools/pkg/check.NewError
importer/config.go:73:14: non-constant format string in call to fmt.Printf
make: *** [Makefile:86: check] Error 1
```

Related: golang/go#60529
@dveeden
Copy link
Contributor Author

dveeden commented Nov 22, 2024

/retest

@dveeden
Copy link
Contributor Author

dveeden commented Nov 25, 2024

/retest

2 similar comments
@dveeden
Copy link
Contributor Author

dveeden commented Nov 25, 2024

/retest

@dveeden
Copy link
Contributor Author

dveeden commented Nov 25, 2024

/retest

@dveeden dveeden requested a review from hawkingrei November 25, 2024 17:37
@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 26, 2024
Copy link

ti-chi-bot bot commented Nov 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-26 09:09:44.053809502 +0000 UTC m=+541171.673464003: ☑️ agreed by Defined2014.

Copy link

ti-chi-bot bot commented Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014

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 Nov 26, 2024
@ti-chi-bot ti-chi-bot bot merged commit a7f18fe into pingcap:master Nov 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants