Skip to content

Commit 6a55b8b

Browse files
polyfloydldez
andauthored
build(deps): bump codeberg.org/polyfloyd/go-errorlint from 1.8.0 to 1.9.0 (#6284)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 70dca3d commit 6a55b8b

File tree

6 files changed

+33
-8
lines changed

6 files changed

+33
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.24.0
55
require (
66
4d63.com/gocheckcompilerdirectives v1.3.0
77
4d63.com/gochecknoglobals v0.2.2
8+
codeberg.org/polyfloyd/go-errorlint v1.9.0
89
dev.gaijin.team/go/exhaustruct/v4 v4.0.0
910
github.com/4meepo/tagalign v1.4.3
1011
github.com/Abirdcfly/dupword v0.1.7
@@ -94,7 +95,6 @@ require (
9495
github.com/nishanths/predeclared v0.2.2
9596
github.com/nunnatsa/ginkgolinter v0.21.2
9697
github.com/pelletier/go-toml/v2 v2.2.4
97-
github.com/polyfloyd/go-errorlint v1.8.0
9898
github.com/quasilyte/go-ruleguard/dsl v0.3.23
9999
github.com/raeperd/recvcheck v0.2.0
100100
github.com/rogpeppe/go-internal v1.14.1

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/errorlint/errorlint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package errorlint
22

33
import (
4-
"github.com/polyfloyd/go-errorlint/errorlint"
4+
"codeberg.org/polyfloyd/go-errorlint/errorlint"
55

66
"github.com/golangci/golangci-lint/v2/pkg/config"
77
"github.com/golangci/golangci-lint/v2/pkg/goanalysis"

pkg/lint/lintersdb/builder_linter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
242242
WithSince("v1.32.0").
243243
WithLoadForGoAnalysis().
244244
WithAutoFix().
245-
WithURL("https://github.com/polyfloyd/go-errorlint"),
245+
WithURL("https://codeberg.org/polyfloyd/go-errorlint"),
246246

247247
linter.NewConfig(exhaustive.New(&cfg.Linters.Settings.Exhaustive)).
248248
WithSince("v1.28.0").

scripts/website/dump_info/thanks.go

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import (
1313
)
1414

1515
const (
16-
hostGitHub = "github"
17-
hostGitLab = "gitlab"
16+
hostGitHub = "github"
17+
hostGitLab = "gitlab"
18+
hostCodeberg = "codeberg"
1819
)
1920

2021
type authorDetails struct {
@@ -77,6 +78,18 @@ func getThanksList() []*authorDetails {
7778
Avatar: fmt.Sprintf("https://github.com/%[1]s.png", ghAuthor),
7879
}
7980
}
81+
82+
case info.FromCodeberg():
83+
if _, ok := addedAuthors[info.Author]; ok {
84+
addedAuthors[info.Author].Linters = append(addedAuthors[info.Author].Linters, lc.Name())
85+
} else {
86+
addedAuthors[info.Author] = &authorDetails{
87+
Name: info.Author,
88+
Linters: []string{lc.Name()},
89+
Profile: fmt.Sprintf("https://codeberg.org/%[1]s", info.Author),
90+
Avatar: fmt.Sprintf("https://codeberg.org/%[1]s.png", info.Author),
91+
}
92+
}
8093
}
8194
}
8295

@@ -99,7 +112,7 @@ type authorInfo struct {
99112
}
100113

101114
func extractInfo(lc *linter.Config) authorInfo {
102-
exp := regexp.MustCompile(`https://(github|gitlab)\.com/([^/]+)/.*`)
115+
exp := regexp.MustCompile(`https://(github|gitlab|codeberg)\.(?:com|org)/([^/]+)/.*`)
103116

104117
switch lc.Name() {
105118
case "exhaustruct":
@@ -164,3 +177,7 @@ func (i authorInfo) FromGitHub() bool {
164177
func (i authorInfo) FromGitLab() bool {
165178
return i.Host == hostGitLab
166179
}
180+
181+
func (i authorInfo) FromCodeberg() bool {
182+
return i.Host == hostCodeberg
183+
}

scripts/website/dump_info/thanks_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ func Test_extractInfo(t *testing.T) {
4848
},
4949
expected: authorInfo{Author: "owner", Host: "gitlab"},
5050
},
51+
{
52+
desc: "from Codeberg",
53+
lc: &linter.Config{
54+
Linter: &FakeLinter{name: "fake"},
55+
OriginalURL: "https://codeberg.org/owner/linter",
56+
},
57+
expected: authorInfo{Author: "owner", Host: "codeberg"},
58+
},
5159
{
5260
desc: "gostaticanalysis",
5361
lc: &linter.Config{

0 commit comments

Comments
 (0)