Skip to content

Commit

Permalink
Update linter to 1.60.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Aug 20, 2024
1 parent 85a3c46 commit d1ef03d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lint: scripts/golangci-lint
.PHONY: lint

scripts/golangci-lint: Makefile
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./scripts v1.58.1
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./scripts v1.60.1

## jslint: enforce a consistent code style for Js code
jslint: scripts/node_modules
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func Setup(cfgFile string) (err error) {
if err := viper.MergeConfig(dest); err != nil {
if _, isParseErr := err.(viper.ConfigParseError); isParseErr {
log.Errorf("Failed to read cozy-stack configurations from %s", cfgFile)
log.Errorf(dest.String())
log.Errorf("%s", dest.String())
return err
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/i18n/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TranslatorHTML(locale, contextName string) func(key string, vars ...interfa
// Translate translates the given key on the specified locale.
func Translate(key, locale, contextName string, vars ...interface{}) string {
if po, ok := translations[contextName+"/"+locale]; ok {
translated := po.Get(key)
translated := po.Get("%s", key)
if translated != key && translated != "" {
if len(vars) > 0 {
return fmt.Sprintf(translated, vars...)
Expand All @@ -60,7 +60,7 @@ func Translate(key, locale, contextName string, vars ...interface{}) string {
}
}
if po, ok := translations[locale]; ok {
translated := po.Get(key)
translated := po.Get("%s", key)
if translated != key && translated != "" {
if len(vars) > 0 {
return fmt.Sprintf(translated, vars...)
Expand Down
4 changes: 2 additions & 2 deletions worker/mails/mail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ func mailServer(t *testing.T, serverString string, clientStrings []string, expec
readdata := false
readhead := false
for i := 0; i < len(data) && data[i] != ""; i++ {
_ = tc.PrintfLine(data[i])
_ = tc.PrintfLine("%s", data[i])
for len(data[i]) >= 4 && data[i][3] == '-' {
i++
_ = tc.PrintfLine(data[i])
_ = tc.PrintfLine("%s", data[i])
}
if data[i] == "221 Goodbye" {
return
Expand Down

0 comments on commit d1ef03d

Please sign in to comment.