mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-11 04:05:10 +02:00
Add testifylint to lint checks (#4535)
go-require lint is ignored for now Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
94933470cd
commit
4de909747b
504 changed files with 5028 additions and 4680 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -294,7 +295,7 @@ func testRenderIssueIndexPattern(t *testing.T, input, expected string, ctx *Rend
|
|||
|
||||
var buf strings.Builder
|
||||
err := postProcess(ctx, []processor{issueIndexPatternProcessor}, strings.NewReader(input), &buf)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, expected, buf.String(), "input=%q", input)
|
||||
}
|
||||
|
||||
|
@ -310,7 +311,7 @@ func TestRender_AutoLink(t *testing.T) {
|
|||
},
|
||||
Metas: localMetas,
|
||||
}, strings.NewReader(input), &buffer)
|
||||
assert.Equal(t, err, nil)
|
||||
require.NoError(t, err, nil)
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer.String()))
|
||||
|
||||
buffer.Reset()
|
||||
|
@ -322,7 +323,7 @@ func TestRender_AutoLink(t *testing.T) {
|
|||
Metas: localMetas,
|
||||
IsWiki: true,
|
||||
}, strings.NewReader(input), &buffer)
|
||||
assert.Equal(t, err, nil)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer.String()))
|
||||
}
|
||||
|
||||
|
@ -353,7 +354,7 @@ func TestRender_FullIssueURLs(t *testing.T) {
|
|||
},
|
||||
Metas: localMetas,
|
||||
}, []processor{fullIssuePatternProcessor}, strings.NewReader(input), &result)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, expected, result.String())
|
||||
}
|
||||
test("Here is a link https://git.osgeo.org/gogs/postgis/postgis/pulls/6",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue