ci: add spell checker and fix existing typo (#3420)

* ci: add spell checker and fix existing typo

* chore: move typos.toml to .github

* fix: correct config file path
This commit is contained in:
Zhizhen He
2023-03-30 16:38:29 +08:00
committed by GitHub
parent e3cee0adc2
commit 6f847a3492
23 changed files with 59 additions and 35 deletions

View File

@@ -93,13 +93,13 @@ Observe the following changes:
* A new message, `Category` was created. This message has a field named `admin` corresponding to the `admin` edge on
the `Category` schema. It is a non-repeated field because we set the edge to be `.Unique()`. It's field number is `3`,
corresponding to the `entproto.Field` annotation on the edge definition.
* A new field `administered` was added to the `User` message definition. It is a `repeated` field, correspending to the
* A new field `administered` was added to the `User` message definition. It is a `repeated` field, corresponding to the
fact that we did not mark the edge as `Unique` in this direction. It's field number is `5`, corresponding to the
`entproto.Field` annotation on the edge.
### Creating Entities with their Edges
Let's demonstrate how to create an entity with it's edges by writing a test:
Let's demonstrate how to create an entity with its edges by writing a test:
```go
package main

View File

@@ -678,7 +678,7 @@ Counter Initialization** header) and re-calculated on startup by looking at the
you happen to have a table with no rows yet, the autoincrement starting value is set to 0 for every table without any
entries. With the online migration feature this wasn't an issue, because the migration engine looked at the `ent_types`
tables and made sure to update the counter, if it wasn't set correctly. However, with versioned migration, this is no
longer the case. In oder to ensure, that everything is set up correctly after a server restart, make sure to call
longer the case. In order to ensure, that everything is set up correctly after a server restart, make sure to call
the `VerifyTableRange` method on the Atlas struct:
```go
@@ -862,7 +862,7 @@ generation, use the `schema.DisableChecksum()` option.
In addition to the usual `.sql` migration files the migration directory will contain the `atlas.sum` file. Every time
you let Ent generate a new migration file, this file is updated for you. However, every manual change made to the
mitration directory will render the migration directory and the `atlas.sum` file out-of-sync. With the Atlas CLI you can
migration directory will render the migration directory and the `atlas.sum` file out-of-sync. With the Atlas CLI you can
both check if the file and migration directory are in-sync, and fix it if not:
```shell

View File

@@ -116,7 +116,7 @@ func (Pet) Fields() []ent.Field {
return []ent.Field{
field.String("name").
NotEmpty(),
field.Int("owner_id"), // <-- explictly add the field we want to contain the FK
field.Int("owner_id"), // <-- explicitly add the field we want to contain the FK
}
}

View File

@@ -29,7 +29,7 @@ The landing page of the AppSync service should render you a "Create API" button,
<div style={{textAlign: 'center'}}>
<img alt="Screenshot of getting started with AWS AppSync from scratch" src="https://entgo.io/images/assets/appsync/from-scratch.png" />
<p style={{fontSize: 12}}>Getting started from sratch with AWS AppSync</p>
<p style={{fontSize: 12}}>Getting started from scratch with AWS AppSync</p>
</div>
In the top panel reading "Customize your API or import from Amazon DynamoDB" select the option "Build from scratch" and click the "Start" button belonging to the panel.
@@ -134,7 +134,7 @@ Second, we add an environment the variable `DATABASE_URL` encoding the database
<div style={{textAlign: 'center'}}>
<img alt="Screenshot of AWS Lambda landing page listing functions" src="https://entgo.io/images/assets/appsync/envars.png" />
<p style={{fontSize: 12}}>AWS Lambda environemnt variables settings of Ent function.</p>
<p style={{fontSize: 12}}>AWS Lambda environment variables settings of Ent function.</p>
</div>
To open a connection to the database, pass in a [DSN](https://en.wikipedia.org/wiki/Data_source_name), e.g., `postgres://username:password@hostname/dbname`.
@@ -396,7 +396,7 @@ import (
)
func main() {
// open the daatabase connection using the pgx driver
// open the database connection using the pgx driver
db, err := sql.Open("pgx", os.Getenv("DATABASE_URL"))
if err != nil {
log.Fatalf("failed opening database connection: %v", err)
@@ -406,7 +406,7 @@ func main() {
client := ent.NewClient(ent.Driver(entsql.OpenDB(dialect.Postgres, db)))
defer client.Close()
// register our event handler to lissten on Lambda events
// register our event handler to listen on Lambda events
lambda.Start(handler.New(client).Handle)
}
```

View File

@@ -65,7 +65,7 @@ Some of Ent's most cited features are:
management tool with many advanced capabilities. Atlas can automatically plan schema migrations for you as
well as verify them in CI or deploy them to production for you. (Full disclosure: Ariel and I are the creators and maintainers)
#### Prerequisities
#### Prerequisites
* [Install Go](https://go.dev/doc/install)
* [Install Docker](https://docs.docker.com/get-docker/)
@@ -700,7 +700,7 @@ We can now run our application and stand amazed at our achievement: a working bl
You can follow the changes in this step in [this commit](https://github.com/rotemtam/ent-blog-example/commit/2e412ab2cda0fd251ccb512099b802174d917511).
:::
No content mangement system would be complete without the ability, well, to manage content. Let's demonstrate how we can add support for publishing new posts on our blog.
No content management system would be complete without the ability, well, to manage content. Let's demonstrate how we can add support for publishing new posts on our blog.
Let's start by creating the backend handler:
```go