Skip to content

Commit

Permalink
ci: Update golangci-lint to v1.61
Browse files Browse the repository at this point in the history
  • Loading branch information
silkeh committed Sep 18, 2024
1 parent 64236e7 commit 151fb40
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.61
19 changes: 6 additions & 13 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ linters:
# Disabled to get codebase to pass the linter.
# We can enable these one at a time.
- cyclop
- err113
- errcheck
- funlen
- gochecknoglobals
- gochecknoinits
- goerr113
- gomnd
- gosec
- lll
- mnd
- nestif
- noctx
- perfsprint
- revive
- stylecheck
- wrapcheck
Expand All @@ -26,17 +27,9 @@ linters:
- depguard # manage using go.mod for now
- nonamedreturns # named returns are acceptable in short functions
# Deprecated
- exhaustivestruct
- scopelint
- interfacer
- maligned
- golint
- structcheck
- varcheck
- deadcode
- nosnakecase
- ifshort

- execinquery
- exportloopref
- gomnd
severity:
default-severity: major

Expand Down
10 changes: 5 additions & 5 deletions builder/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,15 @@ type YPKG struct {
type YPKGUpdate struct {
Release int `xml:"release,attr"`
Type string `xml:"type,attr,omitempty"`
Date string
Version string
Date string `xml:"Date"`
Version string `xml:"Version"`
Comment struct {
Value string `xml:",cdata"`
}
} `xml:"Comment"`
Name struct {
Value string `xml:",cdata"`
}
Email string
} `xml:"Name"`
Email string `xml:"Email"`
}

// WriteXML will attempt to dump the update history to an XML file
Expand Down
2 changes: 1 addition & 1 deletion builder/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func NewManager() (*Manager, error) {
if config, err := NewConfig(); err == nil {
man.Config = config
} else {
slog.Error("Failed to load solbuild configuration %s\n", err)
slog.Error("Failed to load solbuild configuration", "err", err)
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion builder/mmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func MapFile(path string) (*MmapFile, error) {
}

ret.len = st.Size()
ret.Data, err = syscall.Mmap(int(ret.f.Fd()), 0, int(ret.len), syscall.PROT_READ, syscall.MAP_PRIVATE)

ret.Data, err = syscall.Mmap(int(ret.f.Fd()), 0, int(ret.len), syscall.PROT_READ, syscall.MAP_PRIVATE)
if err != nil {
ret.f.Close()
return nil, err
Expand Down
12 changes: 6 additions & 6 deletions builder/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ type YmlPackage struct {

// XMLUpdate represents an update in the package history.
type XMLUpdate struct {
Release int `xml:"release,attr"`
Date string
Version string
Comment string
Name string
Email string
Release int `xml:"release,attr"`
Date string `xml:"Date"`
Version string `xml:"Version"`
Comment string `xml:"Comment"`
Name string `xml:"Name"`
Email string `xml:"Email"`
}

// XMLArchive is an <Archive> line in Source section.
Expand Down
2 changes: 1 addition & 1 deletion builder/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func init() {

// PidNotifier provides a simple way to set the PID on a blocking process.
type PidNotifier interface {
SetActivePID(int)
SetActivePID(pid int)
}

// ActivateRoot will do the hard work of actually bring up the overlayfs
Expand Down

0 comments on commit 151fb40

Please sign in to comment.