Skip to content

Commit

Permalink
ci: increase the number of lint cores
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Feb 13, 2025
1 parent a5f7cfe commit 7ecba02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ issues:
run:
go: '1.23.5'
tests: true # Enable linting test files.
concurrency: 4
timeout: 6m
concurrency: 8
timeout: 8m

# NOTE: these are the default build tags for the linter;
# use `TAGS=... make lint` to check that the corresponding alternative sources do lint correctly;
Expand Down
18 changes: 11 additions & 7 deletions cmn/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import (
jsoniter "github.com/json-iterator/go"
)

const (
confDisabled = "Disabled"
)

type (
Validator interface {
Validate() error
Expand Down Expand Up @@ -1055,7 +1059,7 @@ func (c *SpaceConf) String() string {

func (c *LRUConf) String() string {
if !c.Enabled {
return "Disabled"
return confDisabled
}
return fmt.Sprintf("lru.dont_evict_time=%v, lru.capacity_upd_time=%v", c.DontEvictTime, c.CapacityUpdTime)
}
Expand All @@ -1081,7 +1085,7 @@ func (c *CksumConf) ValidateAsProps(...any) (err error) {

func (c *CksumConf) String() string {
if c.Type == cos.ChecksumNone {
return "Disabled"
return confDisabled
}

toValidate := make([]string, 0)
Expand Down Expand Up @@ -1116,7 +1120,7 @@ func (c *VersionConf) Validate() error {

func (c *VersionConf) String() string {
if !c.Enabled {
return "Disabled"
return confDisabled
}

text := "Enabled | Validate on WarmGET: "
Expand Down Expand Up @@ -1152,7 +1156,7 @@ func (c *MirrorConf) ValidateAsProps(...any) error {

func (c *MirrorConf) String() string {
if !c.Enabled {
return "Disabled"
return confDisabled
}

return fmt.Sprintf("%d copies", c.Copies)
Expand Down Expand Up @@ -1215,7 +1219,7 @@ func (c *ECConf) ValidateAsProps(arg ...any) (err error) {

func (c *ECConf) String() string {
if !c.Enabled {
return "Disabled"
return confDisabled
}
objSizeLimit := c.ObjSizeLimit
if objSizeLimit == ObjSizeToAlwaysReplicate {
Expand Down Expand Up @@ -1817,7 +1821,7 @@ func (c *RebalanceConf) String() string {
if c.Enabled {
return "Enabled"
}
return "Disabled"
return confDisabled
}

func (*ResilverConf) Validate() error { return nil }
Expand All @@ -1826,7 +1830,7 @@ func (c *ResilverConf) String() string {
if c.Enabled {
return "Enabled"
}
return "Disabled"
return confDisabled
}

///////////////////
Expand Down

0 comments on commit 7ecba02

Please sign in to comment.