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

ci: add fmt lint setting for interface{} #50825

Merged
merged 8 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linters:
- predeclared
- revive
- lll
- gofmt

linters-settings:
staticcheck:
Expand Down Expand Up @@ -389,6 +390,13 @@ linters-settings:
- name: waitgroup-by-value
severity: warning
disabled: false
gofmt:
# https://golangci-lint.run/usage/linters/#gofmt
# disable for faster check
simplify: false
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
issues:
exclude-rules:
- path: _test\.go
Expand Down
1 change: 0 additions & 1 deletion br/cmd/br/fips.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build boringcrypto
// +build boringcrypto
hawkingrei marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

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


package main

Expand Down
1 change: 0 additions & 1 deletion br/cmd/tidb-lightning-ctl/fips.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build boringcrypto
// +build boringcrypto

package main

Expand Down
1 change: 0 additions & 1 deletion br/cmd/tidb-lightning/fips.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build boringcrypto
// +build boringcrypto

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/tidb-server/fips.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build boringcrypto
// +build boringcrypto

package main

Expand Down
2 changes: 1 addition & 1 deletion pkg/expression/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type BuildContext interface {
// GetSessionVars gets the session variables.
GetSessionVars() *variable.SessionVars
// SetValue saves a value associated with this context for key.
SetValue(key fmt.Stringer, value interface{})
SetValue(key fmt.Stringer, value any)
// BuiltinFunctionUsageInc increase the counting of each builtin function usage
// Notice that this is a thread safe function
BuiltinFunctionUsageInc(scalarFuncSigName string)
Expand Down
Loading