Skip to content

Commit

Permalink
ci: disable goconst lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ginokent committed Jan 3, 2024
1 parent 0af79f6 commit 840f742
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ linters:
- exhaustruct # https://github.com/GaijinEntertainment/go-exhaustruct
- exhaustivestruct # https://github.com/mbilski/exhaustivestruct
- gci # unnecessary
- goconst # unnecessary
- godox # unnecessary
- golint # deprecated https://github.com/golang/lint
- gomnd # https://github.com/tommy-muehle/go-mnd
Expand Down
12 changes: 6 additions & 6 deletions exp/database/sql/ddl/cockroachdb/ddl_index_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ func (s *CreateIndexStmt) String() string {
}
str += "CREATE "
if s.Unique {
str += "UNIQUE " //nolint:goconst
str += "UNIQUE "
}
str += "INDEX " //nolint:goconst
str += "INDEX "
if s.IfNotExists {
str += "IF NOT EXISTS " //nolint:goconst
str += "IF NOT EXISTS "
}
str += s.Name.String() + " ON " + s.TableName.String() + " (" + stringz.JoinStringers(", ", s.Columns...) + ");\n"
return str
Expand All @@ -46,11 +46,11 @@ func (s *CreateIndexStmt) String() string {
func (s *CreateIndexStmt) StringForDiff() string {
str := "CREATE "
if s.Unique {
str += "UNIQUE " //nolint:goconst
str += "UNIQUE "
}
str += "INDEX " //nolint:goconst
str += "INDEX "
if s.IfNotExists {
str += "IF NOT EXISTS " //nolint:goconst
str += "IF NOT EXISTS "
}
str += s.Name.StringForDiff() + " ON " + s.TableName.StringForDiff() + " ("
for i, c := range s.Columns {
Expand Down
2 changes: 1 addition & 1 deletion exp/database/sql/ddl/cockroachdb/ddl_index_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *DropIndexStmt) String() string {
}
str += "DROP INDEX "
if s.IfExists {
str += "IF EXISTS " //nolint:goconst
str += "IF EXISTS "
}
str += s.Name.String() + ";\n"
return str
Expand Down
8 changes: 4 additions & 4 deletions exp/database/sql/ddl/cockroachdb/ddl_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *PrimaryKeyConstraint) GoString() string { return internal.GoString(*c)
func (c *PrimaryKeyConstraint) String() string {
var str string
if c.Name != nil {
str += "CONSTRAINT " + c.Name.String() + " " //nolint:goconst
str += "CONSTRAINT " + c.Name.String() + " "
}
str += "PRIMARY KEY"
str += " (" + stringz.JoinStringers(", ", c.Columns...) + ")"
Expand All @@ -64,7 +64,7 @@ func (c *PrimaryKeyConstraint) String() string {
func (c *PrimaryKeyConstraint) StringForDiff() string {
var str string
if c.Name != nil {
str += "CONSTRAINT " + c.Name.StringForDiff() + " " //nolint:goconst
str += "CONSTRAINT " + c.Name.StringForDiff() + " "
}
str += "PRIMARY KEY"
str += " ("
Expand Down Expand Up @@ -188,7 +188,7 @@ func (c *CheckConstraint) String() string {
if c.Name != nil {
str += "CONSTRAINT " + c.Name.String() + " "
}
str += "CHECK" //nolint:goconst
str += "CHECK"
str += " (" + stringz.JoinStringers(" ", c.Expr...) + ")"
return str
}
Expand Down Expand Up @@ -310,7 +310,7 @@ func (d *Default) String() string {
return ""
}
if d.Value != nil {
return "DEFAULT " + d.Value.String() //nolint:goconst
return "DEFAULT " + d.Value.String()
}
return ""
}
Expand Down
12 changes: 6 additions & 6 deletions exp/database/sql/ddl/postgres/ddl_index_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ func (s *CreateIndexStmt) String() string {
}
str += "CREATE "
if s.Unique {
str += "UNIQUE " //nolint:goconst
str += "UNIQUE "
}
str += "INDEX " //nolint:goconst
str += "INDEX "
if s.IfNotExists {
str += "IF NOT EXISTS " //nolint:goconst
str += "IF NOT EXISTS "
}
str += s.Name.String() + " ON " + s.TableName.String() + " (" + stringz.JoinStringers(", ", s.Columns...) + ");\n"
return str
Expand All @@ -46,11 +46,11 @@ func (s *CreateIndexStmt) String() string {
func (s *CreateIndexStmt) StringForDiff() string {
str := "CREATE "
if s.Unique {
str += "UNIQUE " //nolint:goconst
str += "UNIQUE "
}
str += "INDEX " //nolint:goconst
str += "INDEX "
if s.IfNotExists {
str += "IF NOT EXISTS " //nolint:goconst
str += "IF NOT EXISTS "
}
str += s.Name.StringForDiff() + " ON " + s.TableName.StringForDiff() + " ("
for i, c := range s.Columns {
Expand Down
2 changes: 1 addition & 1 deletion exp/database/sql/ddl/postgres/ddl_index_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *DropIndexStmt) String() string {
}
str += "DROP INDEX "
if s.IfExists {
str += "IF EXISTS " //nolint:goconst
str += "IF EXISTS "
}
str += s.Name.String() + ";\n"
return str
Expand Down
8 changes: 4 additions & 4 deletions exp/database/sql/ddl/postgres/ddl_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *PrimaryKeyConstraint) GoString() string { return internal.GoString(*c)
func (c *PrimaryKeyConstraint) String() string {
var str string
if c.Name != nil {
str += "CONSTRAINT " + c.Name.String() + " " //nolint:goconst
str += "CONSTRAINT " + c.Name.String() + " "
}
str += "PRIMARY KEY"
str += " (" + stringz.JoinStringers(", ", c.Columns...) + ")"
Expand All @@ -52,7 +52,7 @@ func (c *PrimaryKeyConstraint) String() string {
func (c *PrimaryKeyConstraint) StringForDiff() string {
var str string
if c.Name != nil {
str += "CONSTRAINT " + c.Name.StringForDiff() + " " //nolint:goconst
str += "CONSTRAINT " + c.Name.StringForDiff() + " "
}
str += "PRIMARY KEY"
str += " ("
Expand Down Expand Up @@ -171,7 +171,7 @@ func (c *CheckConstraint) String() string {
if c.Name != nil {
str += "CONSTRAINT " + c.Name.String() + " "
}
str += "CHECK" //nolint:goconst
str += "CHECK"
str += " (" + stringz.JoinStringers(" ", c.Expr...) + ")"
return str
}
Expand Down Expand Up @@ -292,7 +292,7 @@ func (d *Default) String() string {
return ""
}
if d.Value != nil {
return "DEFAULT " + d.Value.String() //nolint:goconst
return "DEFAULT " + d.Value.String()
}
return ""
}
Expand Down

0 comments on commit 840f742

Please sign in to comment.