Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: enable golangci-lint linter misspell (#826)
Yilong Lib31faf88a46e
diff --git a/.golangci.yaml b/.golangci.yamlindex 341c44982a..4d8597cd47 100644--- a/.golangci.yaml+++ b/.golangci.yaml@@ -5,6 +5,7 @@ linters:- golint- govet- staticcheck+ - misspell# golangci-lint run --exclude="Rollback,logger.Sync"issues:diff --git a/api/database.go b/api/database.goindex 13a49c1cfb..25e78fa483 100644--- a/api/database.go+++ b/api/database.go@@ -9,7 +9,7 @@ import (const (// AllDatabaseName is the wild expression for all databases.AllDatabaseName = "*"- // DefaultCharactorSetName is the default charactor set.+ // DefaultCharactorSetName is the default character set.DefaultCharactorSetName = "utf8mb4"// DefaultCollationName is the default collation name.// Use utf8mb4_general_ci instead of the new MySQL 8.0.1 default utf8mb4_0900_ai_cidiff --git a/api/project_test.go b/api/project_test.goindex f74b50358d..3c9d93320b 100644--- a/api/project_test.go+++ b/api/project_test.go@@ -61,14 +61,14 @@ func TestValidateRepositoryFilePathTemplate(t *testing.T) {"missing {{VERSION}}",}, {"UnknownToken",- "{{DB_NAME}}_{{TYPE}}_{{VERSION}}_{{UNKNWON}}.sql",+ "{{DB_NAME}}_{{TYPE}}_{{VERSION}}_{{UNKNOWN}}.sql",TenantModeDisabled,- "unknown token {{UNKNWON}}",+ "unknown token {{UNKNOWN}}",}, {"UnknownToken",- "{{DB_NAME}}_{{TYPE}}_{{VERSION}}_{{UNKNWON}}.sql",+ "{{DB_NAME}}_{{TYPE}}_{{VERSION}}_{{UNKNOWN}}.sql",TenantModeDisabled,- "unknown token {{UNKNWON}}",+ "unknown token {{UNKNOWN}}",}, {"Tenant mode {{ENV_NAME}}","{{ENV_NAME}}/{{DB_NAME}}_{{TYPE}}.sql",diff --git a/plugin/advisor/advisor.go b/plugin/advisor/advisor.goindex 3fff1550f9..053136c518 100644--- a/plugin/advisor/advisor.go+++ b/plugin/advisor/advisor.go@@ -15,11 +15,11 @@ import (type Status stringconst (- // Success is the adivsor status for successes.+ // Success is the advisor status for successes.Success Status = "SUCCESS"- // Warn is the adivsor status for warnings.+ // Warn is the advisor status for warnings.Warn Status = "WARN"- // Error is the adivsor status for errors.+ // Error is the advisor status for errors.Error Status = "ERROR")diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.goindex b90c0fdfff..3f5d1baeb6 100644--- a/plugin/db/pg/pg.go+++ b/plugin/db/pg/pg.go@@ -1791,7 +1791,7 @@ func getEventTriggers(txn *sql.Tx) ([]*eventTriggerSchema, error) {return triggers, nil}-// quoteIdentifier will quote identifiers including keywords, capital charactors, or special charactors.+// quoteIdentifier will quote identifiers including keywords, capital characters, or special characters.func quoteIdentifier(s string) string {quote := falseif reserved[strings.ToUpper(s)] {diff --git a/server/database.go b/server/database.goindex 83a3bee45c..deec673db0 100644--- a/server/database.go+++ b/server/database.go@@ -194,7 +194,7 @@ func (s *Server) registerDatabaseRoutes(g *echo.Group) {return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find sheets by database ID: %d", database.ID)).SetInternal(err)}if len(sheetList) > 0 {- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("The transfering database has %d bound sheets, unbind them first", len(sheetList)))+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("The transferring database has %d bound sheets, unbind them first", len(sheetList)))}toProject, err := s.composeProjectByID(ctx, *databasePatch.ProjectID)