Add golangci-lint gate and fix its findings
Configure golangci-lint v2 for the whole tree (brlapi/duckdb build tags, curated linters, documented exclusions) and resolve what it reports: dead code, wrapped-error comparisons and %w wrapping, unclosed websocket handshake bodies, staticcheck SA/S items, ineffectual assignments, and explicit _ = discards for best-effort teardown errors. Document the gate in CONTRIBUTING and AGENTS.
This commit is contained in:
1 parent
b03cb8917d
commit
0459fb8e50
43 files changed
+166
-112
No files matched your search
@@ -22,10 +22,6 @@ import (
|
||||
"github.com/godbus/dbus/v5/introspect"
|
||||
)
|
||||
|
||||
func introspectionMethods() []introspect.Method {
|
||||
return serviceMethods(false)
|
||||
}
|
||||
|
||||
func serviceMethods(orca bool) []introspect.Method {
|
||||
methods := []introspect.Method{
|
||||
{Name: "ShowPreferences", Args: []introspect.Arg{{Name: "accepted", Type: "b", Direction: "out"}}},
|
||||
|
||||
@@ -75,15 +75,6 @@ func modulePath(base dbus.ObjectPath, name string) dbus.ObjectPath {
|
||||
return dbus.ObjectPath(string(base) + "/" + name)
|
||||
}
|
||||
|
||||
func moduleFor(name string) *moduleSpec {
|
||||
for i := range modules {
|
||||
if modules[i].name == name {
|
||||
return &modules[i]
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (spec moduleSpec) property(name string) (propertySpec, bool) {
|
||||
for _, item := range spec.properties {
|
||||
if item.name == name {
|
||||
|
||||
@@ -187,7 +187,7 @@ func (service *Service) Start(ctx context.Context) error {
|
||||
if !started {
|
||||
for index := exported - 1; index >= 0; index-- {
|
||||
binding := registrations[index]
|
||||
connection.Export(nil, binding.path, binding.iface)
|
||||
_ = connection.Export(nil, binding.path, binding.iface)
|
||||
}
|
||||
connection.Close()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user