Skip to content

Commit dbfc2b2

Browse files
DoctorVinofaurax
authored andcommitted
fix linter and linting
1 parent d521b2e commit dbfc2b2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.golangci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ service:
55

66
linters-settings:
77
govet:
8-
enable:
9-
- fieldalignment
8+
enable-all: true
109
auto-fix: true
1110
shadow: true
1211
settings:
@@ -79,10 +78,9 @@ linters:
7978
issues:
8079
exclude-dirs:
8180
- internal/fixtures
82-
81+
- internal/model/mock
8382
exclude-files:
8483
- "(.*/)*.*_test.go"
85-
8684
exclude-rules:
8785
- linters:
8886
- gosec

internal/flipflop/handler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ func (cth *ConditionTaskHandler) validateFirmware(ctx context.Context) error {
295295
}
296296

297297
// XXX: It is incumbent on the caller to close the BMC handle.
298+
//
299+
//nolint:gocyclo // yeah, I know
298300
func validateFirmwareInternal(ctx context.Context, mon model.BMCBootMonitor, update statusUpdate, delay delayFunc) error {
299301
if err := mon.Open(ctx); err != nil {
300302
return fmt.Errorf("opening bmc connection: %w", err)
@@ -354,7 +356,7 @@ func validateFirmwareInternal(ctx context.Context, mon model.BMCBootMonitor, upd
354356
var err error
355357
for !hostBooted {
356358
// now we've reset the server, give it a chance to come back
357-
if err := delay(ctx); err != nil {
359+
if err = delay(ctx); err != nil {
358360
return fmt.Errorf("context error: %w", err)
359361
}
360362
hostBooted, err = mon.BootComplete()

internal/flipflop/validation_client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919

2020
func defaultBMCTransport() *http.Transport {
2121
return &http.Transport{
22+
//nolint:gosec // BMCs use self-signed certs
2223
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
2324
DisableKeepAlives: true,
2425
Dial: (&net.Dialer{

0 commit comments

Comments
 (0)