1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00

linting: fix typos, add toml validation (#7007)

- adds the `toml` plugin to the `eslint` linting → expect to have `options/setting/config.toml` by #6862
- fixes `make lint-codespell` commands
- related concerning `codespell`: #3270
- info: codespell check is and was not activated in the workflows (could maybe, runs only few seconds on my system)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7007
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
Robert Wolff 2025-02-21 08:23:03 +00:00 committed by Earl Warren
parent e8ebb5d6e3
commit dc5bc1fe5b
26 changed files with 94 additions and 38 deletions

View file

@ -140,7 +140,7 @@ func (r *Release) LoadArchiveDownloadCount(ctx context.Context) error {
return err
}
// GetTotalDownloadCount returns the summary of all dowload count of files attached to the release
// GetTotalDownloadCount returns the summary of all download count of files attached to the release
func (r *Release) GetTotalDownloadCount(ctx context.Context) (int64, error) {
var archiveCount int64
if !r.HideArchiveLinks {
@ -194,7 +194,7 @@ func (r *Release) SummaryCardURL() string {
return fmt.Sprintf("%s/releases/summary-card/%s", r.Repo.HTMLURL(), util.PathEscapeSegments(r.TagName))
}
// DisplayName retruns the name of the release
// DisplayName returns the name of the release
func (r *Release) DisplayName() string {
if r.IsTag && r.Title == "" {
return r.TagName

View file

@ -69,7 +69,7 @@ func init() {
}
// GetUserRedirect returns the redirect for a given username, this is a
// case-insenstive operation.
// case-insensitive operation.
func GetUserRedirect(ctx context.Context, userName string) (*Redirect, error) {
userName = strings.ToLower(userName)
redirect := &Redirect{LowerName: userName}

View file

@ -665,7 +665,7 @@ func TestEmailTo(t *testing.T) {
{"Hi Its <Mee>", "ee@mail.box", `"Hi Its Mee" <ee@mail.box>`},
{"Sinéad.O'Connor", "sinead.oconnor@gmail.com", "=?utf-8?b?U2luw6lhZC5PJ0Nvbm5vcg==?= <sinead.oconnor@gmail.com>"},
{"Æsir", "aesir@gmx.de", "=?utf-8?q?=C3=86sir?= <aesir@gmx.de>"},
{"new😀user", "new.user@alo.com", "=?utf-8?q?new=F0=9F=98=80user?= <new.user@alo.com>"}, // codespell-ignore
{"new😀user", "new.user@alo.com", "=?utf-8?q?new=F0=9F=98=80user?= <new.user@alo.com>"}, // codespell:ignore
{`"quoted"`, "quoted@test.com", `"quoted" <quoted@test.com>`},
{`gusted`, "gusted@test.com", `"gusted" <gusted@test.com>`},
{`Joe Q. Public`, "john.q.public@example.com", `"Joe Q. Public" <john.q.public@example.com>`},