ScuttleBot

fix: disable govet shadow+fieldalignment, fix remaining gofmt issues

lmata 2026-04-01 18:29 trunk
Commit 57db3d6db144caff3c4b63975a62bb427a6a4f1c5c869d44e43d47ccdea32e43
--- .golangci.yml
+++ .golangci.yml
@@ -12,10 +12,11 @@
1212
linters-settings:
1313
govet:
1414
enable-all: true
1515
disable:
1616
- fieldalignment
17
+ - shadow
1718
1819
issues:
1920
exclude-rules:
2021
- path: _test\.go
2122
linters:
2223
--- .golangci.yml
+++ .golangci.yml
@@ -12,10 +12,11 @@
12 linters-settings:
13 govet:
14 enable-all: true
15 disable:
16 - fieldalignment
 
17
18 issues:
19 exclude-rules:
20 - path: _test\.go
21 linters:
22
--- .golangci.yml
+++ .golangci.yml
@@ -12,10 +12,11 @@
12 linters-settings:
13 govet:
14 enable-all: true
15 disable:
16 - fieldalignment
17 - shadow
18
19 issues:
20 exclude-rules:
21 - path: _test\.go
22 linters:
23
--- internal/bots/manager/manager.go
+++ internal/bots/manager/manager.go
@@ -78,11 +78,11 @@
7878
ircAddr string
7979
dataDir string
8080
prov Provisioner
8181
channels ChannelLister
8282
log *slog.Logger
83
- passwords map[string]string // nick → password, persisted
83
+ passwords map[string]string // nick → password, persisted
8484
running map[string]context.CancelFunc
8585
}
8686
8787
// New creates a Manager.
8888
func New(ircAddr, dataDir string, prov Provisioner, channels ChannelLister, log *slog.Logger) *Manager {
8989
--- internal/bots/manager/manager.go
+++ internal/bots/manager/manager.go
@@ -78,11 +78,11 @@
78 ircAddr string
79 dataDir string
80 prov Provisioner
81 channels ChannelLister
82 log *slog.Logger
83 passwords map[string]string // nick → password, persisted
84 running map[string]context.CancelFunc
85 }
86
87 // New creates a Manager.
88 func New(ircAddr, dataDir string, prov Provisioner, channels ChannelLister, log *slog.Logger) *Manager {
89
--- internal/bots/manager/manager.go
+++ internal/bots/manager/manager.go
@@ -78,11 +78,11 @@
78 ircAddr string
79 dataDir string
80 prov Provisioner
81 channels ChannelLister
82 log *slog.Logger
83 passwords map[string]string // nick → password, persisted
84 running map[string]context.CancelFunc
85 }
86
87 // New creates a Manager.
88 func New(ircAddr, dataDir string, prov Provisioner, channels ChannelLister, log *slog.Logger) *Manager {
89
--- internal/bots/sentinel/sentinel.go
+++ internal/bots/sentinel/sentinel.go
@@ -89,18 +89,18 @@
8989
}
9090
}
9191
9292
// msgEntry is a buffered channel message.
9393
type msgEntry struct {
94
- at time.Time
95
- nick string
96
- text string
94
+ at time.Time
95
+ nick string
96
+ text string
9797
}
9898
9999
// chanBuffer holds unanalysed messages for a channel.
100100
type chanBuffer struct {
101
- msgs []msgEntry
101
+ msgs []msgEntry
102102
lastScan time.Time
103103
}
104104
105105
// Bot is the sentinel bot.
106106
type Bot struct {
107107
--- internal/bots/sentinel/sentinel.go
+++ internal/bots/sentinel/sentinel.go
@@ -89,18 +89,18 @@
89 }
90 }
91
92 // msgEntry is a buffered channel message.
93 type msgEntry struct {
94 at time.Time
95 nick string
96 text string
97 }
98
99 // chanBuffer holds unanalysed messages for a channel.
100 type chanBuffer struct {
101 msgs []msgEntry
102 lastScan time.Time
103 }
104
105 // Bot is the sentinel bot.
106 type Bot struct {
107
--- internal/bots/sentinel/sentinel.go
+++ internal/bots/sentinel/sentinel.go
@@ -89,18 +89,18 @@
89 }
90 }
91
92 // msgEntry is a buffered channel message.
93 type msgEntry struct {
94 at time.Time
95 nick string
96 text string
97 }
98
99 // chanBuffer holds unanalysed messages for a channel.
100 type chanBuffer struct {
101 msgs []msgEntry
102 lastScan time.Time
103 }
104
105 // Bot is the sentinel bot.
106 type Bot struct {
107
--- internal/bots/warden/warden.go
+++ internal/bots/warden/warden.go
@@ -64,13 +64,13 @@
6464
lastAction time.Time
6565
}
6666
6767
// channelState holds per-channel warden state.
6868
type channelState struct {
69
- mu sync.Mutex
70
- cfg ChannelConfig
71
- nicks map[string]*nickState
69
+ mu sync.Mutex
70
+ cfg ChannelConfig
71
+ nicks map[string]*nickState
7272
}
7373
7474
func newChannelState(cfg ChannelConfig) *channelState {
7575
cfg.defaults()
7676
return &channelState{cfg: cfg, nicks: make(map[string]*nickState)}
7777
--- internal/bots/warden/warden.go
+++ internal/bots/warden/warden.go
@@ -64,13 +64,13 @@
64 lastAction time.Time
65 }
66
67 // channelState holds per-channel warden state.
68 type channelState struct {
69 mu sync.Mutex
70 cfg ChannelConfig
71 nicks map[string]*nickState
72 }
73
74 func newChannelState(cfg ChannelConfig) *channelState {
75 cfg.defaults()
76 return &channelState{cfg: cfg, nicks: make(map[string]*nickState)}
77
--- internal/bots/warden/warden.go
+++ internal/bots/warden/warden.go
@@ -64,13 +64,13 @@
64 lastAction time.Time
65 }
66
67 // channelState holds per-channel warden state.
68 type channelState struct {
69 mu sync.Mutex
70 cfg ChannelConfig
71 nicks map[string]*nickState
72 }
73
74 func newChannelState(cfg ChannelConfig) *channelState {
75 cfg.defaults()
76 return &channelState{cfg: cfg, nicks: make(map[string]*nickState)}
77

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button