Skip to content

Commit

Permalink
chore: Remove lint ignore comments - test (#2011)
Browse files Browse the repository at this point in the history
* Remove lint ignore comments from one file

* Remove all other occurrences
  • Loading branch information
sfc-gh-asawicki committed Aug 16, 2023
1 parent 79d9c9c commit 8f81a42
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 170 deletions.
12 changes: 6 additions & 6 deletions pkg/sdk/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var (
)

type CreateAccountOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
account bool `ddl:"static" sql:"ACCOUNT"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
account bool `ddl:"static" sql:"ACCOUNT"`
name AccountObjectIdentifier `ddl:"identifier"`

// Object properties
Expand Down Expand Up @@ -84,8 +84,8 @@ func (c *accounts) Create(ctx context.Context, id AccountObjectIdentifier, opts
}

type AlterAccountOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
account bool `ddl:"static" sql:"ACCOUNT"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
account bool `ddl:"static" sql:"ACCOUNT"`

Set *AccountSet `ddl:"keyword" sql:"SET"`
Unset *AccountUnset `ddl:"list,no_parentheses" sql:"UNSET"`
Expand Down Expand Up @@ -283,8 +283,8 @@ func (c *accounts) Alter(ctx context.Context, opts *AlterAccountOptions) error {
}

type ShowAccountOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
accounts bool `ddl:"static" sql:"ORGANIZATION ACCOUNTS"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
accounts bool `ddl:"static" sql:"ORGANIZATION ACCOUNTS"`
Like *Like `ddl:"keyword" sql:"LIKE"`
}

Expand Down
20 changes: 10 additions & 10 deletions pkg/sdk/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type alerts struct {
}

type CreateAlertOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
OrReplace *bool `ddl:"keyword" sql:"OR REPLACE"`
alert bool `ddl:"static" sql:"ALERT"` //lint:ignore U1000 This is used in the ddl tag
alert bool `ddl:"static" sql:"ALERT"`
IfNotExists *bool `ddl:"keyword" sql:"IF NOT EXISTS"`
name SchemaObjectIdentifier `ddl:"identifier"`

Expand Down Expand Up @@ -99,8 +99,8 @@ var (
)

type AlterAlertOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
alert bool `ddl:"static" sql:"ALERT"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
alert bool `ddl:"static" sql:"ALERT"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name SchemaObjectIdentifier `ddl:"identifier"`

Expand Down Expand Up @@ -166,8 +166,8 @@ func (v *alerts) Alter(ctx context.Context, id SchemaObjectIdentifier, opts *Alt
}

type dropAlertOptions struct {
drop bool `ddl:"static" sql:"DROP"` //lint:ignore U1000 This is used in the ddl tag
alert bool `ddl:"static" sql:"ALERT"` //lint:ignore U1000 This is used in the ddl tag
drop bool `ddl:"static" sql:"DROP"`
alert bool `ddl:"static" sql:"ALERT"`
name SchemaObjectIdentifier `ddl:"identifier"`
}

Expand Down Expand Up @@ -198,9 +198,9 @@ func (v *alerts) Drop(ctx context.Context, id SchemaObjectIdentifier) error {
}

type ShowAlertOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
Terse *bool `ddl:"keyword" sql:"TERSE"`
alerts bool `ddl:"static" sql:"ALERTS"` //lint:ignore U1000 This is used in the ddl tag
alerts bool `ddl:"static" sql:"ALERTS"`

// optional
Like *Like `ddl:"keyword" sql:"LIKE"`
Expand Down Expand Up @@ -316,8 +316,8 @@ func (v *alerts) ShowByID(ctx context.Context, id SchemaObjectIdentifier) (*Aler
}

type describeAlertOptions struct {
describe bool `ddl:"static" sql:"DESCRIBE"` //lint:ignore U1000 This is used in the ddl tag
alert bool `ddl:"static" sql:"ALERT"` //lint:ignore U1000 This is used in the ddl tag
describe bool `ddl:"static" sql:"DESCRIBE"`
alert bool `ddl:"static" sql:"ALERT"`
name SchemaObjectIdentifier `ddl:"identifier"`
}

Expand Down
52 changes: 26 additions & 26 deletions pkg/sdk/databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ func (row *databaseRow) toDatabase() *Database {
}

type CreateDatabaseOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
OrReplace *bool `ddl:"keyword" sql:"OR REPLACE"`
Transient *bool `ddl:"keyword" sql:"TRANSIENT"`
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
IfNotExists *bool `ddl:"keyword" sql:"IF NOT EXISTS"`
Clone *Clone `ddl:"-"`
DataRetentionTimeInDays *int `ddl:"parameter" sql:"DATA_RETENTION_TIME_IN_DAYS"`
Expand Down Expand Up @@ -174,9 +174,9 @@ func (v *databases) Create(ctx context.Context, id AccountObjectIdentifier, opts
}

type CreateSharedDatabaseOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
fromShare ExternalObjectIdentifier `ddl:"identifier" sql:"FROM SHARE"`
Comment *string `ddl:"parameter,single_quotes" sql:"COMMENT"`
}
Expand Down Expand Up @@ -211,9 +211,9 @@ func (v *databases) CreateShared(ctx context.Context, id AccountObjectIdentifier
}

type CreateSecondaryDatabaseOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
primaryDatabase ExternalObjectIdentifier `ddl:"identifier" sql:"AS REPLICA OF"`
DataRetentionTimeInDays *int `ddl:"parameter" sql:"DATA_RETENTION_TIME_IN_DAYS"`
}
Expand Down Expand Up @@ -246,8 +246,8 @@ func (v *databases) CreateSecondary(ctx context.Context, id AccountObjectIdentif
}

type AlterDatabaseOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
database bool `ddl:"static" sql:"DATABASE"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`
NewName AccountObjectIdentifier `ddl:"identifier" sql:"RENAME TO"`
Expand Down Expand Up @@ -329,8 +329,8 @@ func (v *databases) Alter(ctx context.Context, id AccountObjectIdentifier, opts
}

type AlterDatabaseReplicationOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
EnableReplication *EnableReplication `ddl:"keyword" sql:"ENABLE REPLICATION"`
DisableReplication *DisableReplication `ddl:"keyword" sql:"DISABLE REPLICATION"`
Expand Down Expand Up @@ -394,8 +394,8 @@ func (v *databases) AlterReplication(ctx context.Context, id AccountObjectIdenti
}

type AlterDatabaseFailoverOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
EnableFailover *EnableFailover `ddl:"keyword" sql:"ENABLE FAILOVER"`
DisableFailover *DisableFailover `ddl:"keyword" sql:"DISABLE FAILOVER"`
Expand Down Expand Up @@ -458,10 +458,10 @@ func (v *databases) AlterFailover(ctx context.Context, id AccountObjectIdentifie
}

type DropDatabaseOptions struct {
drop bool `ddl:"static" sql:"DROP"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
drop bool `ddl:"static" sql:"DROP"`
database bool `ddl:"static" sql:"DATABASE"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"`
}

func (opts *DropDatabaseOptions) validate() error {
Expand All @@ -488,9 +488,9 @@ func (v *databases) Drop(ctx context.Context, id AccountObjectIdentifier, opts *
}

type undropDatabaseOptions struct {
undrop bool `ddl:"static" sql:"UNDROP"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
undrop bool `ddl:"static" sql:"UNDROP"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
}

func (opts *undropDatabaseOptions) validate() error {
Expand All @@ -516,9 +516,9 @@ func (v *databases) Undrop(ctx context.Context, id AccountObjectIdentifier) erro
}

type ShowDatabasesOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
Terse *bool `ddl:"keyword" sql:"TERSE"`
databases bool `ddl:"static" sql:"DATABASES"` //lint:ignore U1000 This is used in the ddl tag
databases bool `ddl:"static" sql:"DATABASES"`
History *bool `ddl:"keyword" sql:"HISTORY"`
Like *Like `ddl:"keyword" sql:"LIKE"`
StartsWith *string `ddl:"parameter,single_quotes,no_equals" sql:"STARTS WITH"`
Expand Down Expand Up @@ -577,9 +577,9 @@ type DatabaseDetailsRow struct {
}

type describeDatabaseOptions struct {
describe bool `ddl:"static" sql:"DESCRIBE"` //lint:ignore U1000 This is used in the ddl tag
database bool `ddl:"static" sql:"DATABASE"` //lint:ignore U1000 This is used in the ddl tag
name AccountObjectIdentifier `ddl:"identifier"` //lint:ignore U1000 This is used in the ddl tag
describe bool `ddl:"static" sql:"DESCRIBE"`
database bool `ddl:"static" sql:"DATABASE"`
name AccountObjectIdentifier `ddl:"identifier"`
}

func (opts *describeDatabaseOptions) validate() error {
Expand Down
32 changes: 16 additions & 16 deletions pkg/sdk/failover_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const (
)

type CreateFailoverGroupOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"`
IfNotExists *bool `ddl:"keyword" sql:"IF NOT EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`

Expand Down Expand Up @@ -91,8 +91,8 @@ func (v *failoverGroups) Create(ctx context.Context, id AccountObjectIdentifier,
}

type CreateSecondaryReplicationGroupOptions struct {
create bool `ddl:"static" sql:"CREATE"` //lint:ignore U1000 This is used in the ddl tag
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"` //lint:ignore U1000 This is used in the ddl tag
create bool `ddl:"static" sql:"CREATE"`
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"`
IfNotExists *bool `ddl:"keyword" sql:"IF NOT EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`
primaryFailoverGroup ExternalObjectIdentifier `ddl:"identifier" sql:"AS REPLICA OF"`
Expand Down Expand Up @@ -126,8 +126,8 @@ func (v *failoverGroups) CreateSecondaryReplicationGroup(ctx context.Context, id
}

type AlterSourceFailoverGroupOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`
NewName AccountObjectIdentifier `ddl:"identifier" sql:"RENAME TO"`
Expand Down Expand Up @@ -232,8 +232,8 @@ func (v *failoverGroups) AlterSource(ctx context.Context, id AccountObjectIdenti
}

type AlterTargetFailoverGroupOptions struct {
alter bool `ddl:"static" sql:"ALTER"` //lint:ignore U1000 This is used in the ddl tag
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"` //lint:ignore U1000 This is used in the ddl tag
alter bool `ddl:"static" sql:"ALTER"`
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`
Refresh *bool `ddl:"keyword" sql:"REFRESH"`
Expand Down Expand Up @@ -269,8 +269,8 @@ func (v *failoverGroups) AlterTarget(ctx context.Context, id AccountObjectIdenti
}

type DropFailoverGroupOptions struct {
drop bool `ddl:"static" sql:"DROP"` //lint:ignore U1000 This is used in the ddl tag
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"` //lint:ignore U1000 This is used in the ddl tag
drop bool `ddl:"static" sql:"DROP"`
failoverGroup bool `ddl:"static" sql:"FAILOVER GROUP"`
IfExists *bool `ddl:"keyword" sql:"IF EXISTS"`
name AccountObjectIdentifier `ddl:"identifier"`
}
Expand Down Expand Up @@ -303,8 +303,8 @@ func (v *failoverGroups) Drop(ctx context.Context, id AccountObjectIdentifier, o

// ShowFailoverGroupOptions represents the options for listing failover groups.
type ShowFailoverGroupOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
failoverGroups bool `ddl:"static" sql:"FAILOVER GROUPS"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
failoverGroups bool `ddl:"static" sql:"FAILOVER GROUPS"`
InAccount AccountIdentifier `ddl:"identifier" sql:"IN ACCOUNT"`
}

Expand Down Expand Up @@ -489,8 +489,8 @@ func (v *failoverGroups) ShowByID(ctx context.Context, id AccountObjectIdentifie
}

type showFailoverGroupDatabasesOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
databases bool `ddl:"static" sql:"DATABASES"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
databases bool `ddl:"static" sql:"DATABASES"`
in AccountObjectIdentifier `ddl:"identifier" sql:"IN FAILOVER GROUP"`
}

Expand Down Expand Up @@ -527,8 +527,8 @@ func (v *failoverGroups) ShowDatabases(ctx context.Context, id AccountObjectIden
}

type showFailoverGroupSharesOptions struct {
show bool `ddl:"static" sql:"SHOW"` //lint:ignore U1000 This is used in the ddl tag
databases bool `ddl:"static" sql:"SHARES"` //lint:ignore U1000 This is used in the ddl tag
show bool `ddl:"static" sql:"SHOW"`
databases bool `ddl:"static" sql:"SHARES"`
in AccountObjectIdentifier `ddl:"identifier" sql:"IN FAILOVER GROUP"`
}

Expand Down

0 comments on commit 8f81a42

Please sign in to comment.