Skip to content

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

chore: enable linter empty-lines (#2217)

Yilong Lia0fd935ff590
diff --git a/.golangci.yaml b/.golangci.yaml
index 596e7112de..ab03a4af13 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -73,8 +73,6 @@ linters-settings:
disabled: true
- name: empty-block
disabled: true
- - name: empty-lines
- disabled: true
- name: confusing-naming
disabled: true
- name: defer
diff --git a/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go b/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go
index 8f19ae180e..00c651c99a 100644
--- a/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go
+++ b/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go
@@ -64,7 +64,6 @@ func (*NoLeadingWildcardLikeAdvisor) Check(ctx advisor.Context, statement string
})
}
return checker.adviceList, nil
-
}
type noLeadingWildcardLikeChecker struct {
diff --git a/plugin/advisor/mysql/advisor_stmt_no_select_all.go b/plugin/advisor/mysql/advisor_stmt_no_select_all.go
index 245302922f..5bf3013d3e 100644
--- a/plugin/advisor/mysql/advisor_stmt_no_select_all.go
+++ b/plugin/advisor/mysql/advisor_stmt_no_select_all.go
@@ -74,7 +74,6 @@ func (v *noSelectAllChecker) Enter(in ast.Node) (ast.Node, bool) {
break
}
}
-
}
return in, false
}
diff --git a/plugin/advisor/pg/advisor_naming_table_test.go b/plugin/advisor/pg/advisor_naming_table_test.go
index 17cab8e4db..15dbcf289d 100644
--- a/plugin/advisor/pg/advisor_naming_table_test.go
+++ b/plugin/advisor/pg/advisor_naming_table_test.go
@@ -105,5 +105,4 @@ func TestPostgreSQLNamingTableConvention(t *testing.T) {
Level: advisor.SchemaRuleLevelError,
Payload: string(payload),
}, advisor.MockPostgreSQLDatabase)
-
}
diff --git a/server/auth.go b/server/auth.go
index b6c68c2238..01f905f6fe 100644
--- a/server/auth.go
+++ b/server/auth.go
@@ -16,7 +16,6 @@ import (
)
func (s *Server) registerAuthRoutes(g *echo.Group) {
-
// for now, we only support Gitlab
g.GET("/auth/provider", func(c echo.Context) error {
ctx := c.Request().Context()
diff --git a/server/issue.go b/server/issue.go
index 893d445407..b7a53b817d 100644
--- a/server/issue.go
+++ b/server/issue.go
@@ -399,7 +399,6 @@ func (s *Server) createPipelineFromIssue(ctx context.Context, issueCreate *api.I
return nil, fmt.Errorf("failed to create task DAG for issue, error %w", err)
}
}
-
}
return pipelineCreated, nil
diff --git a/store/label.go b/store/label.go
index 5771a26c27..a9e6059e09 100644
--- a/store/label.go
+++ b/store/label.go
@@ -154,7 +154,6 @@ func (s *Store) SetDatabaseLabelList(ctx context.Context, labelList []*api.Datab
}
return ret, nil
-
}
// FindLabelKey finds a list of LabelKey instances.
diff --git a/store/metadb.go b/store/metadb.go
index 5f0dd121a2..0c24f670c0 100644
--- a/store/metadb.go
+++ b/store/metadb.go
@@ -56,7 +56,6 @@ func (m *MetadataDB) Connect(datastorePort int, readonly bool, version string) (
return m.connectEmbed(datastorePort, m.pgUser, readonly, m.demoDataDir, version, m.mode)
}
return m.connectExternal(readonly, version)
-
}
// connectEmbed starts the embed postgres server and returns an instance of store.DB.
diff --git a/tests/tests.go b/tests/tests.go
index 4f3e73c40a..1694a19a97 100644
--- a/tests/tests.go
+++ b/tests/tests.go
@@ -287,7 +287,6 @@ func (ctl *controller) waitForHealthz() error {
if err != nil {
log.Error("Fail to create a new GET request", zap.String("URL", gURL), zap.Error(err))
continue
-
}
resp, err := ctl.client.Do(req)
@@ -309,10 +308,8 @@ func (ctl *controller) waitForHealthz() error {
case end := <-timer.C:
return fmt.Errorf("cannot wait for healthz in duration: %v", end.Sub(begin).Seconds())
-
}
}
-
}
// Close closes long running resources.
@@ -780,7 +777,6 @@ func (ctl *controller) approveIssueNext(issue *api.Issue) error {
Status: api.TaskPending,
},
issue.Pipeline.ID); err != nil {
-
return fmt.Errorf("failed to patch task status for task %d, error: %w", task.ID, err)
}
return nil