Skip to content

Commit 34cd783

Browse files
committed
[DATALAD RUNCMD] run codespell throughout
=== Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 6a4e620 commit 34cd783

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+140
-140
lines changed

CHANGELOG.md

Lines changed: 61 additions & 61 deletions
Large diffs are not rendered by default.

cmd/hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ Gitea or set your environment appropriately.`, "")
696696
type pktLineType int64
697697

698698
const (
699-
// UnKnow type
699+
// unknown type
700700
pktLineTypeUnknow pktLineType = 0
701701
// flush-pkt "0000"
702702
pktLineTypeFlush pktLineType = iota

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ Default templates for project boards:
853853
- `ResponseWriter`: the responseWriter from the request.
854854
- `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched).
855855
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script.
856-
- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
856+
- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are split by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
857857
- e.g.
858858
- In the Request Header: X-Request-ID: **test-id-123**
859859
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
@@ -1268,7 +1268,7 @@ Default storage configuration for attachments, lfs, avatars, repo-avatars, repo-
12681268
- `MINIO_USE_SSL`: **false**: Minio enabled ssl only available when `STORAGE_TYPE` is `minio`
12691269
- `MINIO_INSECURE_SKIP_VERIFY`: **false**: Minio skip SSL verification available when STORAGE_TYPE is `minio`
12701270

1271-
The recommanded storage configuration for minio like below:
1271+
The recommended storage configuration for minio like below:
12721272

12731273
```ini
12741274
[storage]

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Attachments, lfs, avatars, repo-avatars, repo-archive, packages, actions_log, ac
423423
- `MINIO_LOCATION`: **us-east-1**: Minio location to create bucket,仅当 `STORAGE_TYPE``minio` 时有效。
424424
- `MINIO_USE_SSL`: **false**: Minio enabled ssl,仅当 `STORAGE_TYPE``minio` 时有效。
425425

426-
以下为推荐的 recommanded storage configuration for minio like below:
426+
以下为推荐的 recommended storage configuration for minio like below:
427427

428428
```ini
429429
[storage]

docs/content/usage/packages/storage.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This document describes the storage of the package registry and how it can be ma
1919

2020
## Deduplication
2121

22-
The package registry has a build-in deduplication of uploaded blobs.
22+
The package registry has a built-in deduplication of uploaded blobs.
2323
If two identical files are uploaded only one blob is saved on the filesystem.
2424
This ensures no space is wasted for duplicated files.
2525

models/actions/tasks_version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
// ActionTasksVersion
1515
// If both ownerID and repoID is zero, its scope is global.
16-
// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currrently).
16+
// If ownerID is not zero and repoID is zero, its scope is org (there is no user-level runner currently).
1717
// If ownerID is zero and repoID is not zero, its scope is repo.
1818
type ActionTasksVersion struct {
1919
ID int64 `xorm:"pk autoincr"`

models/auth/oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ func (err ErrOAuthApplicationNotFound) Unwrap() error {
526526
return util.ErrNotExist
527527
}
528528

529-
// GetActiveOAuth2ProviderSources returns all actived LoginOAuth2 sources
529+
// GetActiveOAuth2ProviderSources returns all activated LoginOAuth2 sources
530530
func GetActiveOAuth2ProviderSources() ([]*Source, error) {
531531
sources := make([]*Source, 0, 1)
532532
if err := db.GetEngine(db.DefaultContext).Where("is_active = ? and type = ?", true, OAuth2).Find(&sources); err != nil {

models/auth/oauth2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestOAuth2Application_ContainsRedirectURI_WithPort(t *testing.T) {
5959
// not loopback
6060
assert.False(t, app.ContainsRedirectURI("http://192.168.0.1:9954/"))
6161
assert.False(t, app.ContainsRedirectURI("http://intranet:3456/"))
62-
// unparseable
62+
// unparsable
6363
assert.False(t, app.ContainsRedirectURI(":"))
6464
}
6565

models/fixtures/pull_request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-
22
id: 1
33
type: 0 # gitea pull request
4-
status: 2 # mergable
4+
status: 2 # mergeable
55
issue_id: 2
66
index: 2
77
head_repo_id: 1
@@ -15,7 +15,7 @@
1515
-
1616
id: 2
1717
type: 0 # gitea pull request
18-
status: 2 # mergable
18+
status: 2 # mergeable
1919
issue_id: 3
2020
index: 3
2121
head_repo_id: 1
@@ -28,7 +28,7 @@
2828
-
2929
id: 3
3030
type: 0 # gitea pull request
31-
status: 2 # mergable
31+
status: 2 # mergeable
3232
issue_id: 8
3333
index: 1
3434
head_repo_id: 11
@@ -41,7 +41,7 @@
4141
-
4242
id: 4
4343
type: 0 # gitea pull request
44-
status: 2 # mergable
44+
status: 2 # mergeable
4545
issue_id: 9
4646
index: 1
4747
head_repo_id: 48
@@ -54,7 +54,7 @@
5454
-
5555
id: 5 # this PR is outdated (one commit behind branch1 )
5656
type: 0 # gitea pull request
57-
status: 2 # mergable
57+
status: 2 # mergeable
5858
issue_id: 11
5959
index: 5
6060
head_repo_id: 1
@@ -67,7 +67,7 @@
6767
-
6868
id: 6
6969
type: 0 # gitea pull request
70-
status: 2 # mergable
70+
status: 2 # mergeable
7171
issue_id: 12
7272
index: 2
7373
head_repo_id: 3

models/git/branch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestFindRenamedBranch(t *testing.T) {
114114
assert.True(t, exist)
115115
assert.Equal(t, "master", branch.To)
116116

117-
_, exist, err = git_model.FindRenamedBranch(db.DefaultContext, 1, "unknow")
117+
_, exist, err = git_model.FindRenamedBranch(db.DefaultContext, 1, "unknown")
118118
assert.NoError(t, err)
119119
assert.False(t, exist)
120120
}

models/issues/label_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func TestGetLabelsByIssueID(t *testing.T) {
257257
func TestUpdateLabel(t *testing.T) {
258258
assert.NoError(t, unittest.PrepareTestDatabase())
259259
label := unittest.AssertExistsAndLoadBean(t, &issues_model.Label{ID: 1})
260-
// make sure update wont overwrite it
260+
// make sure update won't overwrite it
261261
update := &issues_model.Label{
262262
ID: label.ID,
263263
Color: "#ffff00",

models/issues/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ func UpdateAllowEdits(ctx context.Context, pr *PullRequest) error {
812812

813813
// Mergeable returns if the pullrequest is mergeable.
814814
func (pr *PullRequest) Mergeable() bool {
815-
// If a pull request isn't mergable if it's:
815+
// If a pull request isn't mergeable if it's:
816816
// - Being conflict checked.
817817
// - Has a conflict.
818818
// - Received a error while being conflict checked.

models/issues/tracked_time.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ func AddTime(ctx context.Context, user *user_model.User, issue *Issue, amount in
173173
Issue: issue,
174174
Repo: issue.Repo,
175175
Doer: user,
176-
// Content before v1.21 did store the formated string instead of seconds,
177-
// so use "|" as delimeter to mark the new format
176+
// Content before v1.21 did store the formatted string instead of seconds,
177+
// so use "|" as delimiter to mark the new format
178178
Content: fmt.Sprintf("|%d", amount),
179179
Type: CommentTypeAddTimeManual,
180180
TimeID: t.ID,
@@ -253,8 +253,8 @@ func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error {
253253
Issue: issue,
254254
Repo: issue.Repo,
255255
Doer: user,
256-
// Content before v1.21 did store the formated string instead of seconds,
257-
// so use "|" as delimeter to mark the new format
256+
// Content before v1.21 did store the formatted string instead of seconds,
257+
// so use "|" as delimiter to mark the new format
258258
Content: fmt.Sprintf("|%d", removedTime),
259259
Type: CommentTypeDeleteTimeManual,
260260
}); err != nil {
@@ -284,8 +284,8 @@ func DeleteTime(t *TrackedTime) error {
284284
Issue: t.Issue,
285285
Repo: t.Issue.Repo,
286286
Doer: t.User,
287-
// Content before v1.21 did store the formated string instead of seconds,
288-
// so use "|" as delimeter to mark the new format
287+
// Content before v1.21 did store the formatted string instead of seconds,
288+
// so use "|" as delimiter to mark the new format
289289
Content: fmt.Sprintf("|%d", t.Time),
290290
Type: CommentTypeDeleteTimeManual,
291291
}); err != nil {

models/migrations/v1_17/v216.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
package v1_17 //nolint
55

66
// This migration added non-ideal indices to the action table which on larger datasets slowed things down
7-
// it has been superceded by v218.go
7+
// it has been superseded by v218.go

modules/avatar/identicon/identicon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (i *Identicon) render(c, b1, b2, b1Angle, b2Angle, foreColor int) image.Ima
7070
/*
7171
# Algorithm
7272
73-
Origin: An image is splitted into 9 areas
73+
Origin: An image is split into 9 areas
7474
7575
```
7676
-------------

modules/doctor/dbconsistency.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func genericOrphanCheck(name, subject, refobject, joincond string) consistencyCh
7474
}
7575

7676
func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) error {
77-
// make sure DB version is uptodate
77+
// make sure DB version is up-to-date
7878
if err := db.InitEngineWithMigration(ctx, migrations.EnsureUpToDate); err != nil {
7979
logger.Critical("Model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded")
8080
return err

modules/git/ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (ref RefName) RefGroup() string {
184184
}
185185

186186
// RefType returns the simple ref type of the reference, e.g. branch, tag
187-
// It's differrent from RefGroup, which is using the name of the directory under .git/refs
187+
// It's different from RefGroup, which is using the name of the directory under .git/refs
188188
// Here we using branch but not heads, using tag but not tags
189189
func (ref RefName) RefType() string {
190190
var refType string

modules/gitgraph/graph_models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (flow *Flow) AddGlyph(row, column int, glyph byte) {
180180
})
181181
}
182182

183-
// Glyph represents a co-ordinate and glyph
183+
// Glyph represents a coordinate and glyph
184184
type Glyph struct {
185185
Row int
186186
Column int
@@ -234,7 +234,7 @@ func newRefsFromRefNames(refNames []byte) []git.Reference {
234234
return refs
235235
}
236236

237-
// Commit represents a commit at co-ordinate X, Y with the data
237+
// Commit represents a commit at coordinate X, Y with the data
238238
type Commit struct {
239239
Commit *git.Commit
240240
User *user_model.User

modules/indexer/code/git.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func nonGenesisChanges(ctx context.Context, repo *repo_model.Repository, revisio
113113
}
114114
fields := strings.Split(line, "\t")
115115
if len(fields) < 2 {
116-
log.Warn("Unparseable output for diff --name-status: `%s`)", line)
116+
log.Warn("Unparsable output for diff --name-status: `%s`)", line)
117117
continue
118118
}
119119
filename := fields[1]
@@ -133,12 +133,12 @@ func nonGenesisChanges(ctx context.Context, repo *repo_model.Repository, revisio
133133
changes.RemovedFilenames = append(changes.RemovedFilenames, filename)
134134
case 'R', 'C':
135135
if len(fields) < 3 {
136-
log.Warn("Unparseable output for diff --name-status: `%s`)", line)
136+
log.Warn("Unparsable output for diff --name-status: `%s`)", line)
137137
continue
138138
}
139139
dest := fields[2]
140140
if len(dest) == 0 {
141-
log.Warn("Unparseable output for diff --name-status: `%s`)", line)
141+
log.Warn("Unparsable output for diff --name-status: `%s`)", line)
142142
continue
143143
}
144144
if dest[0] == '"' {

modules/process/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ func (pm *Manager) AddTypedContext(parent context.Context, description, processT
134134
//
135135
// Most processes will not need to use the cancel function but there will be cases whereby you want to cancel the process but not immediately remove it from the
136136
// process table.
137-
func (pm *Manager) AddContextTimeout(parent context.Context, timeout time.Duration, description string) (ctx context.Context, cancel context.CancelFunc, finshed FinishedFunc) {
137+
func (pm *Manager) AddContextTimeout(parent context.Context, timeout time.Duration, description string) (ctx context.Context, cancel context.CancelFunc, finished FinishedFunc) {
138138
if timeout <= 0 {
139139
// it's meaningless to use timeout <= 0, and it must be a bug! so we must panic here to tell developers to make the timeout correct
140140
panic("the timeout must be greater than zero, otherwise the context will be cancelled immediately")
141141
}
142142

143143
ctx, cancel = context.WithTimeout(parent, timeout)
144144

145-
ctx, _, finshed = pm.Add(ctx, description, cancel, NormalProcessType, true)
145+
ctx, _, finished = pm.Add(ctx, description, cancel, NormalProcessType, true)
146146

147-
return ctx, cancel, finshed
147+
return ctx, cancel, finished
148148
}
149149

150150
// Add create a new process

modules/setting/storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ func getStorage(rootCfg ConfigProvider, name, typ string, sec ConfigSection) (*S
102102
targetType := targetSec.Key("STORAGE_TYPE").String()
103103
if targetType == "" {
104104
if !IsValidStorageType(StorageType(typ)) {
105-
return nil, fmt.Errorf("unknow storage type %q", typ)
105+
return nil, fmt.Errorf("unknown storage type %q", typ)
106106
}
107107
targetSec.Key("STORAGE_TYPE").SetValue(typ)
108108
} else if !IsValidStorageType(StorageType(targetType)) {
109-
return nil, fmt.Errorf("unknow storage type %q for section storage.%v", targetType, typ)
109+
return nil, fmt.Errorf("unknown storage type %q for section storage.%v", targetType, typ)
110110
}
111111
}
112112
}

modules/templates/helper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestSubjectBodySeparator(t *testing.T) {
4848
test("Multiple\n---\n-------\n---\nSeparators",
4949
"Multiple\n",
5050
"\n-------\n---\nSeparators")
51-
test("Insuficient\n--\nSeparators",
51+
test("Insufficient\n--\nSeparators",
5252
"",
53-
"Insuficient\n--\nSeparators")
53+
"Insufficient\n--\nSeparators")
5454
}

modules/typesniffer/typesniffer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ func TestIsSvgImage(t *testing.T) {
4848
<!-- Comments -->
4949
<svg></svg>`)).IsSvgImage())
5050
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
51-
<!-- Multline
51+
<!-- Multiline
5252
Comment -->
5353
<svg></svg>`)).IsSvgImage())
5454
assert.True(t, DetectContentType([]byte(`<?xml version="1.0" encoding="UTF-8"?>
5555
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
56-
<!-- Multline
56+
<!-- Multiline
5757
Comment -->
5858
<svg></svg>`)).IsSvgImage())
5959

modules/util/color.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
// Check similar implementation in web_src/js/utils/color.js and keep synchronization
1313

14-
// Return R, G, B values defined in reletive luminance
14+
// Return R, G, B values defined in relative luminance
1515
func getLuminanceRGB(channel float64) float64 {
1616
sRGB := channel / 255
1717
if sRGB <= 0.03928 {

modules/util/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func PathJoinRel(elem ...string) string {
4646
}
4747

4848
// PathJoinRelX joins the path elements into a single path like PathJoinRel,
49-
// and covert all backslashes to slashes. (X means "extended", also means the combination of `\` and `/`).
49+
// and convert all backslashes to slashes. (X means "extended", also means the combination of `\` and `/`).
5050
// It's caller's duty to make every element not bypass its own directly level, to avoid security issues.
5151
// It returns similar results as PathJoinRel except:
5252
//

routers/api/actions/artifacts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (ar artifactRoutes) uploadArtifact(ctx *ArtifactContext) {
254254
})
255255
}
256256

257-
// comfirmUploadArtifact comfirm upload artifact.
257+
// comfirmUploadArtifact confirm upload artifact.
258258
// if all chunks are uploaded, merge them to one file.
259259
func (ar artifactRoutes) comfirmUploadArtifact(ctx *ArtifactContext) {
260260
_, runID, ok := validateRunID(ctx)

routers/api/actions/runner/interceptor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var withRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar
3636
uuid := request.Header().Get(uuidHeaderKey)
3737
token := request.Header().Get(tokenHeaderKey)
3838
// TODO: version will be removed from request header after Gitea 1.20 released.
39-
// And Gitea will not try to read version from reuqest header
39+
// And Gitea will not try to read version from request header
4040
version := request.Header().Get(versionHeaderKey)
4141

4242
runner, err := actions_model.GetRunnerByUUID(ctx, uuid)
@@ -53,7 +53,7 @@ var withRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar
5353
cols := []string{"last_online"}
5454

5555
// TODO: version will be removed from request header after Gitea 1.20 released.
56-
// And Gitea will not try to read version from reuqest header
56+
// And Gitea will not try to read version from request header
5757
version, _ = util.SplitStringAtByteN(version, 64)
5858
if !util.IsEmptyString(version) && runner.Version != version {
5959
runner.Version = version

routers/api/actions/runner/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (s *Service) FetchTask(
148148

149149
if tasksVersion != latestVersion {
150150
// if the task version in request is not equal to the version in db,
151-
// it means there may still be some tasks not be assgined.
151+
// it means there may still be some tasks not be assigned.
152152
// try to pick a task for the runner that send the request.
153153
if t, ok, err := pickTask(ctx, runner); err != nil {
154154
log.Error("pick task failed: %v", err)

routers/api/packages/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The package registry code is divided into multiple modules to split the function
1919

2020
## Models
2121

22-
Every package registry implementation uses the same underlaying models:
22+
Every package registry implementation uses the same underlying models:
2323

2424
| Model | Description |
2525
| - | - |

routers/api/v1/repo/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ func ListIssues(ctx *context.APIContext) {
401401
}
402402
}
403403

404-
if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 {
405-
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, splitted)
404+
if split := strings.Split(ctx.FormString("labels"), ","); len(split) > 0 {
405+
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, split)
406406
if err != nil {
407407
ctx.Error(http.StatusInternalServerError, "GetLabelIDsInRepoByNames", err)
408408
return

0 commit comments

Comments
 (0)