Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #3118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/atlas/internal/cmdapi/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ const applyLockValue = "atlas_migrate_execute"

func checkRevisionSchemaClarity(cmd *cobra.Command, c *sqlclient.Client, revisionSchemaFlag string) error {
// The "old" default behavior for the revision schema location was to store the revision table in its own schema.
// Now, the table is saved in the connected schema, if any. To keep the backwards compatability, we now require
// Now, the table is saved in the connected schema, if any. To keep the backwards compatibility, we now require
// for schema bound connections to have the schema-revision flag present if there is no revision table in the schema
// but the old default schema does have one.
if c.URL.Schema != "" && revisionSchemaFlag == "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/atlas/internal/cmdext/cmdext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ data "aws_rds_token" "token" {
username = "root"
endpoint = "localhost:3306"
region = "us-east-1"
profile = "errorneous"
profile = "erroneous"
}

v = data.aws_rds_token.token
Expand All @@ -112,7 +112,7 @@ v = data.aws_rds_token.token
state = schemahcl.New(cmdext.SpecOptions...)
)
err := state.EvalBytes([]byte(doc), &v, nil)
require.EqualError(t, err, "data.aws_rds_token.token: loading aws config: failed to get shared config profile, errorneous")
require.EqualError(t, err, "data.aws_rds_token.token: loading aws config: failed to get shared config profile, erroneous")
}

func TestGCPToken(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/atlas/internal/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type (
Image string
// Env vars to pass to the docker container.
Env []string
// Internal Port to expose anc connect to.
// Internal Port to expose and connect to.
Port string
// Database name to create and connect on init.
Database string
Expand Down
2 changes: 1 addition & 1 deletion cmd/atlas/internal/sqlparse/sqliteparse/sqliteparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (p *FileParser) FixChange(_ migrate.Driver, s string, changes schema.Change
}
if r, ok := stmt.RenameColumn(); ok {
if len(changes) != 1 {
return nil, fmt.Errorf("unexpected number fo changes: %d", len(changes))
return nil, fmt.Errorf("unexpected number of changes: %d", len(changes))
}
modify, ok := changes[0].(*schema.ModifyTable)
if !ok {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# inspect without dev-db will failed
# inspect without dev-db will fail
! atlas schema inspect -u file://a.sql
stderr 'Error: --dev-url cannot be empty'

Expand Down
2 changes: 1 addition & 1 deletion schemahcl/schemahcl.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func (s *State) mayScopeContext(ctx *hcl.EvalContext, scope []string) *hcl.EvalC
return ctx
}
nctx := ctx.NewChild()
// Use the same variables/functions maps to avoid copying per scope, but return a
// Use the same variables/functions maps to avoid copying per scope, but return
// another child context to prevent writes from different blocks to the same maps.
nctx.Variables, nctx.Functions = vars, funcs
return nctx.NewChild()
Expand Down
2 changes: 1 addition & 1 deletion sql/internal/specutil/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ func fromDependsOn[T interface{ AddDeps(...schema.Object) T }](loc string, t T,
})
}
if err != nil {
return fmt.Errorf("find %s refrence for %s.depends_on[%d]: %w", loc, p[0].T, i, err)
return fmt.Errorf("find %s reference for %s.depends_on[%d]: %w", loc, p[0].T, i, err)
}
t.AddDeps(o)
}
Expand Down
2 changes: 1 addition & 1 deletion sql/migrate/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ type (
// Error implements the error interface.
func (err *ChecksumError) Error() string { return ErrChecksumMismatch.Error() }

// Is exists for backwards compatability reasons.
// Is exists for backwards compatibility reasons.
func (err *ChecksumError) Is(target error) bool {
return errors.Is(ErrChecksumMismatch, target)
}
Expand Down
2 changes: 1 addition & 1 deletion sql/postgres/inspect_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ func (i *inspect) partitions(s *schema.Schema) error {
for i := range idxs {
switch idx, err := strconv.Atoi(idxs[i]); {
case err != nil:
return fmt.Errorf("postgres: faild parsing partition key index %q", idxs[i])
return fmt.Errorf("postgres: failed parsing partition key index %q", idxs[i])
// An expression.
case idx == 0:
j := sqlx.ExprLastIndex(d.exprs)
Expand Down
2 changes: 1 addition & 1 deletion sql/schema/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ const (

// List of diff modes.
const (
DiffModeUnset DiffMode = iota // Default, backwards compatability.
DiffModeUnset DiffMode = iota // Default, backwards compatibility.
DiffModeNotNormalized // Diff objects are considered to be in not normalized state.
DiffModeNormalized // Diff objects are considered to be in normalized state.
)
Expand Down
2 changes: 1 addition & 1 deletion sql/sqlite/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ func defaultExpr(x string) schema.Expr {
}
}

// blob literals are hex strings preceded by 'x' (or 'X).
// blob literals are hex strings preceded by 'x' (or 'X').
func isBlob(s string) bool {
if (strings.HasPrefix(s, "x'") || strings.HasPrefix(s, "X'")) && strings.HasSuffix(s, "'") {
_, err := strconv.ParseUint(s[2:len(s)-1], 16, 64)
Expand Down