1
0
Fork 0
forked from forgejo/forgejo

Update go tool dependencies, restructure lint targets (#24239)

- Update all tool dependencies to latest tag
- Remove unused errcheck, it is part of golangci-lint
- Include main.go in air
- Enable wastedassign again now that it's
[generics-compatible](https://github.com/golangci/golangci-lint/pull/3689)
- Restructured lint targets to new `lint-*` namespace
This commit is contained in:
silverwind 2023-04-22 20:53:00 +02:00 committed by GitHub
parent 8820191476
commit 8dc6eabbc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 88 additions and 58 deletions

View file

@ -47,7 +47,9 @@ func (e *escapeStreamer) EscapeStatus() *EscapeStatus {
// Text tells the next streamer there is a text
func (e *escapeStreamer) Text(data string) error {
sb := &strings.Builder{}
pos, until, next := 0, 0, 0
var until int
var next int
pos := 0
if len(data) > len(UTF8BOM) && data[:len(UTF8BOM)] == string(UTF8BOM) {
_, _ = sb.WriteString(data[:len(UTF8BOM)])
pos = len(UTF8BOM)

View file

@ -108,7 +108,7 @@ func dumpVar(v any) template.HTML {
return "<pre>dumpVar: only available in dev mode</pre>"
}
m, ok := dumpVarMarshalable(v, map[uintptr]bool{})
dumpStr := ""
var dumpStr string
jsonBytes, err := json.MarshalIndent(m, "", " ")
if err != nil {
dumpStr = fmt.Sprintf("dumpVar: unable to marshal %T: %v", v, err)

View file

@ -23,7 +23,7 @@ const (
)
func computeTimeDiffFloor(diff int64, lang translation.Locale) (int64, string) {
diffStr := ""
var diffStr string
switch {
case diff <= 0:
diff = 0

View file

@ -72,7 +72,6 @@ func (store *localeStore) AddLocaleByIni(langName, langDesc string, source, more
l.idxToMsgMap[idx] = key.Value()
}
}
iniFile = nil
return nil
}