mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367)
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
parent
51ff4970ec
commit
fed2d81c44
427 changed files with 2043 additions and 2046 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
func TestAmbiguousCharacters(t *testing.T) {
|
||||
for locale, ambiguous := range AmbiguousCharacters {
|
||||
assert.Equal(t, locale, ambiguous.Locale)
|
||||
assert.Equal(t, len(ambiguous.Confusable), len(ambiguous.With))
|
||||
assert.Len(t, ambiguous.With, len(ambiguous.Confusable))
|
||||
assert.True(t, sort.SliceIsSorted(ambiguous.Confusable, func(i, j int) bool {
|
||||
return ambiguous.Confusable[i] < ambiguous.Confusable[j]
|
||||
}))
|
||||
|
|
|
@ -253,7 +253,7 @@ func TestToUTF8WithFallbackReader(t *testing.T) {
|
|||
input += "// Выключаем"
|
||||
rd := ToUTF8WithFallbackReader(bytes.NewReader([]byte(input)), ConvertOpts{})
|
||||
r, _ := io.ReadAll(rd)
|
||||
assert.EqualValuesf(t, input, string(r), "testing string len=%d", testLen)
|
||||
assert.Equalf(t, input, string(r), "testing string len=%d", testLen)
|
||||
}
|
||||
|
||||
truncatedOneByteExtension := failFastBytes
|
||||
|
|
|
@ -151,7 +151,7 @@ func (e *escapeStreamer) brokenRune(bs []byte) error {
|
|||
e.escaped.Escaped = true
|
||||
e.escaped.HasBadRunes = true
|
||||
|
||||
if err := e.PassthroughHTMLStreamer.StartTag("span", html.Attribute{
|
||||
if err := e.StartTag("span", html.Attribute{
|
||||
Key: "class",
|
||||
Val: "broken-code-point",
|
||||
}); err != nil {
|
||||
|
@ -161,14 +161,14 @@ func (e *escapeStreamer) brokenRune(bs []byte) error {
|
|||
return err
|
||||
}
|
||||
|
||||
return e.PassthroughHTMLStreamer.EndTag("span")
|
||||
return e.EndTag("span")
|
||||
}
|
||||
|
||||
func (e *escapeStreamer) ambiguousRune(r, c rune) error {
|
||||
e.escaped.Escaped = true
|
||||
e.escaped.HasAmbiguous = true
|
||||
|
||||
if err := e.PassthroughHTMLStreamer.StartTag("span", html.Attribute{
|
||||
if err := e.StartTag("span", html.Attribute{
|
||||
Key: "class",
|
||||
Val: "ambiguous-code-point",
|
||||
}, html.Attribute{
|
||||
|
@ -177,7 +177,7 @@ func (e *escapeStreamer) ambiguousRune(r, c rune) error {
|
|||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := e.PassthroughHTMLStreamer.StartTag("span", html.Attribute{
|
||||
if err := e.StartTag("span", html.Attribute{
|
||||
Key: "class",
|
||||
Val: "char",
|
||||
}); err != nil {
|
||||
|
@ -186,18 +186,18 @@ func (e *escapeStreamer) ambiguousRune(r, c rune) error {
|
|||
if err := e.PassthroughHTMLStreamer.Text(string(r)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := e.PassthroughHTMLStreamer.EndTag("span"); err != nil {
|
||||
if err := e.EndTag("span"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return e.PassthroughHTMLStreamer.EndTag("span")
|
||||
return e.EndTag("span")
|
||||
}
|
||||
|
||||
func (e *escapeStreamer) invisibleRune(r rune) error {
|
||||
e.escaped.Escaped = true
|
||||
e.escaped.HasInvisible = true
|
||||
|
||||
if err := e.PassthroughHTMLStreamer.StartTag("span", html.Attribute{
|
||||
if err := e.StartTag("span", html.Attribute{
|
||||
Key: "class",
|
||||
Val: "escaped-code-point",
|
||||
}, html.Attribute{
|
||||
|
@ -206,7 +206,7 @@ func (e *escapeStreamer) invisibleRune(r rune) error {
|
|||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := e.PassthroughHTMLStreamer.StartTag("span", html.Attribute{
|
||||
if err := e.StartTag("span", html.Attribute{
|
||||
Key: "class",
|
||||
Val: "char",
|
||||
}); err != nil {
|
||||
|
@ -215,11 +215,11 @@ func (e *escapeStreamer) invisibleRune(r rune) error {
|
|||
if err := e.PassthroughHTMLStreamer.Text(string(r)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := e.PassthroughHTMLStreamer.EndTag("span"); err != nil {
|
||||
if err := e.EndTag("span"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return e.PassthroughHTMLStreamer.EndTag("span")
|
||||
return e.EndTag("span")
|
||||
}
|
||||
|
||||
type runeCountType struct {
|
||||
|
|
|
@ -190,5 +190,5 @@ func TestAmbiguousUnicodeDetectionContext(t *testing.T) {
|
|||
assert.EqualValues(t, `a<span class="escaped-code-point" data-escaped="[U+00A0]"><span class="char"> </span></span>test`, out)
|
||||
|
||||
_, out = EscapeControlHTML(input, &translation.MockLocale{}, testContext)
|
||||
assert.EqualValues(t, input, out)
|
||||
assert.Equal(t, input, out)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue