Skip to content

Commit 1f5f4ac

Browse files
committed
update golangci-lint to v1.61.0
1 parent a521077 commit 1f5f4ac

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: golangci-lint
3535
uses: golangci/golangci-lint-action@v6
3636
with:
37-
version: v1.55.2
37+
version: v1.61.0
3838
only-new-issues: true
3939
build:
4040
name: Build

.golangci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ linters-settings:
66
excludes:
77
- G402
88
- G106
9-
gomnd:
9+
mnd:
1010
ignored-functions:
1111
- strings.SplitN
1212
depguard:
@@ -47,7 +47,7 @@ linters:
4747
- lll
4848
- errorlint
4949
- errcheck
50-
- gomnd
50+
- mnd
5151
- nolintlint
5252

5353
issues:
@@ -57,7 +57,7 @@ issues:
5757
- errcheck
5858
- text: "Magic number: 1024, in <argument> detected"
5959
linters:
60-
- gomnd
60+
- mnd
6161
- text: "ifElseChain: rewrite if-else to switch statement"
6262
linters:
6363
- gocritic

libvirt/cloudinit_def.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (ci *defCloudInit) buildTerraformKey(volumeKey string) string {
128128
return fmt.Sprintf("%s;%s", volumeKey, uuid.New())
129129
}
130130

131-
//nolint:gomnd
131+
//nolint:mnd
132132
func getCloudInitVolumeKeyFromTerraformID(id string) (string, error) {
133133
s := strings.SplitN(id, ";", 2)
134134
if len(s) != 2 {

libvirt/coreos_ignition_def.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (ign *defIgnition) buildTerraformKey(volumeKey string) string {
117117
return fmt.Sprintf("%s;%s", volumeKey, uuid.New())
118118
}
119119

120-
//nolint:gomnd
120+
//nolint:mnd
121121
func getIgnitionVolumeKeyFromTerraformID(id string) (string, error) {
122122
s := strings.SplitN(id, ";", 2)
123123
if len(s) != 2 {

libvirt/domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ func setDisks(d *schema.ResourceData, domainDef *libvirtxml.Domain, virConn *lib
492492
if wwn, ok := d.GetOk(prefix + ".wwn"); ok {
493493
disk.WWN = wwn.(string)
494494
} else {
495-
//nolint:gomnd
495+
//nolint:mnd
496496
disk.WWN = randomWWN(10)
497497
}
498498

libvirt/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func getNetworkIPConfig(address string) (*libvirtxml.NetworkIP, *libvirtxml.Netw
149149

150150
ones, bits := ipNet.Mask.Size()
151151
family := "ipv4"
152-
if bits == (net.IPv6len * 8) { //nolint:gomnd
152+
if bits == (net.IPv6len * 8) { //nolint:mnd
153153
family = "ipv6"
154154
}
155155

libvirt/resource_libvirt_domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func resourceLibvirtDomain() *schema.Resource {
3939
StateContext: schema.ImportStatePassthroughContext,
4040
},
4141
Timeouts: &schema.ResourceTimeout{
42-
//nolint:gomnd
42+
//nolint:mnd
4343
Create: schema.DefaultTimeout(5 * time.Minute),
4444
},
4545
Schema: map[string]*schema.Schema{

libvirt/resource_libvirt_network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func resourceLibvirtNetworkRead(ctx context.Context, d *schema.ResourceData, met
538538

539539
// read add the IP addresses
540540
addresses := []string{}
541-
//nolint:gomnd
541+
//nolint:mnd
542542
for _, address := range networkDef.IPs {
543543
// we get the host interface IP (ie, 10.10.8.1) but we want the network CIDR (ie, 10.10.8.0/24)
544544
// so we need some transformations...

libvirt/utils_net.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// randomMACAddress returns a randomized MAC address
1010
// with libvirt prefix.
1111
//
12-
//nolint:gomnd
12+
//nolint:mnd
1313
func randomMACAddress() (string, error) {
1414
buf := make([]byte, 3)
1515
//nolint:gosec // math.rand is enough for this
@@ -31,7 +31,7 @@ func randomMACAddress() (string, error) {
3131
buf[0], buf[1], buf[2]), nil
3232
}
3333

34-
//nolint:gomnd
34+
//nolint:mnd
3535
func getNetMaskWithMax16Bits(m net.IPMask) net.IPMask {
3636
ones, bits := m.Size()
3737

libvirt/utils_volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func newCopier(virConn *libvirt.Libvirt, volume *libvirt.StorageVol, size uint64
2929
return copier
3030
}
3131

32-
//nolint:gomnd
32+
//nolint:mnd
3333
func timeFromEpoch(str string) time.Time {
3434
var s, ns int
3535

0 commit comments

Comments
 (0)