Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: tighten up some golangci lint rule (#7663)

Danny Xu739eacb1da3e
diff --git a/.golangci.yaml b/.golangci.yaml
index a0640479c0..7aed2f3e0c 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -20,16 +20,11 @@ linters:
issues:
include:
# https://golangci-lint.run/usage/configuration/#command-line-options
- - EXC0012
- - EXC0013
- - EXC0014
- - EXC0015
exclude:
- Rollback
- logger.Sync
- pgInstance.Stop
- fmt.Printf
- - fmt.Print
- Enter(.*)_(.*)
- Exit(.*)_(.*)
diff --git a/backend/bin/server/cmd/root.go b/backend/bin/server/cmd/root.go
index 912fa8a9cd..fbd3f91ac3 100644
--- a/backend/bin/server/cmd/root.go
+++ b/backend/bin/server/cmd/root.go
@@ -96,7 +96,7 @@ var (
Run: func(_ *cobra.Command, _ []string) {
start()
- fmt.Print(byeBanner)
+ fmt.Printf("%s", byeBanner)
},
}
)
diff --git a/backend/bin/sql-service/cmd/root.go b/backend/bin/sql-service/cmd/root.go
index f7aa7a3141..627e26cd2a 100644
--- a/backend/bin/sql-service/cmd/root.go
+++ b/backend/bin/sql-service/cmd/root.go
@@ -80,7 +80,7 @@ var (
Run: func(_ *cobra.Command, _ []string) {
start()
- fmt.Print(byeBanner)
+ fmt.Printf("%s", byeBanner)
},
}
)
diff --git a/backend/plugin/parser/sql/plsql_test.go b/backend/plugin/parser/sql/plsql_test.go
index 4a930ea6e0..168bac125d 100644
--- a/backend/plugin/parser/sql/plsql_test.go
+++ b/backend/plugin/parser/sql/plsql_test.go
@@ -1,7 +1,6 @@
package parser
import (
- "fmt"
"testing"
plsqlparser "github.com/bytebase/plsql-parser"
@@ -33,9 +32,7 @@ func TestPLSQLParser(t *testing.T) {
for _, test := range tests {
tree, _, err := ParsePLSQL(test.statement)
- if sql, ok := tree.(*plsqlparser.Sql_scriptContext); ok {
- fmt.Println(sql.GetText())
- }
+ _, _ = tree.(*plsqlparser.Sql_scriptContext)
if test.errorMessage == "" {
require.NoError(t, err)
} else {