Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: remove HelloWorldRule test advisor (#18108)
Danny Xu32f123162a87
diff --git a/backend/plugin/advisor/pg/advisor_hello_world.go b/backend/plugin/advisor/pg/advisor_hello_world.godeleted file mode 100644index 5917b444bf..0000000000--- a/backend/plugin/advisor/pg/advisor_hello_world.go+++ /dev/null@@ -1,43 +0,0 @@-package pg--import (- "context"-- "github.com/bytebase/bytebase/backend/plugin/advisor/code"-- storepb "github.com/bytebase/bytebase/backend/generated-go/store"- "github.com/bytebase/bytebase/backend/plugin/advisor"-)--var (- _ advisor.Advisor = (*HelloWorldAdvisor)(nil)-)--const (- // HelloWorldRule is a test-only rule type for hello world advisor- HelloWorldRule advisor.SQLReviewRuleType = "hello-world"-)--func init() {- advisor.Register(storepb.Engine_POSTGRES, HelloWorldRule, &HelloWorldAdvisor{})-}--// HelloWorldAdvisor is a test advisor that always reports "hello world".-type HelloWorldAdvisor struct {-}--// Check always returns a warning at line 0 column 0 with message "hello world".-func (*HelloWorldAdvisor) Check(_ context.Context, _ advisor.Context) ([]*storepb.Advice, error) {- return []*storepb.Advice{- {- Status: storepb.Advice_WARNING,- Code: code.Ok.Int32(),- Title: "Hello World Test",- Content: "hello world",- StartPosition: &storepb.Position{- Line: 0,- Column: 0,- },- },- }, nil-}diff --git a/backend/plugin/advisor/pg/pgantlr_test.go b/backend/plugin/advisor/pg/pgantlr_test.goindex 3b172474ab..d3dc0734a7 100644--- a/backend/plugin/advisor/pg/pgantlr_test.go+++ b/backend/plugin/advisor/pg/pgantlr_test.go@@ -9,7 +9,6 @@ import (func TestPostgreSQLANTLRRules(t *testing.T) {antlrRules := []advisor.SQLReviewRuleType{- HelloWorldRule, // Test advisor to verify framework worksadvisor.BuiltinRulePriorBackupCheck, // Migrated from legacyadvisor.SchemaRuleCharsetAllowlist, // Migrated from legacyadvisor.SchemaRuleCollationAllowlist, // Migrated from legacy