Skip to content

Commit 508f285

Browse files
committed
linter config fixes
1 parent f0d0fa5 commit 508f285

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

pkg/netbox/api/ip_range_claim_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func TestIPRangeClaim(t *testing.T) {
4646
ipRangeV4_7 := "10.112.140.7/24"
4747
ipRangeV4_8 := "10.112.140.8/24"
4848

49-
expectedIp_5 := "10.112.140.5/32"
50-
expectedIp_7 := "10.112.140.7/32"
49+
expectedIpDot5 := "10.112.140.5/32"
50+
expectedIpDot7 := "10.112.140.7/32"
5151

5252
// example of available IPv4 ip adress
5353
availableIpAdressesIPv4 := func() []*netboxModels.AvailableIP {
@@ -144,8 +144,8 @@ func TestIPRangeClaim(t *testing.T) {
144144
// assert error
145145
AssertNil(t, err)
146146
// assert nil output
147-
assert.Equal(t, expectedIp_5, actual.StartAddress)
148-
assert.Equal(t, expectedIp_7, actual.EndAddress)
147+
assert.Equal(t, expectedIpDot5, actual.StartAddress)
148+
assert.Equal(t, expectedIpDot7, actual.EndAddress)
149149
})
150150

151151
t.Run("Fail first available IP range by claim (IPv6) if not enough consequiteve ips.", func(t *testing.T) {
@@ -225,8 +225,8 @@ func TestIPRangeClaim(t *testing.T) {
225225
Previous: nil,
226226
Results: []*netboxModels.IPRange{
227227
{
228-
StartAddress: &expectedIp_5,
229-
EndAddress: &expectedIp_7,
228+
StartAddress: &expectedIpDot5,
229+
EndAddress: &expectedIpDot7,
230230
},
231231
},
232232
},
@@ -246,8 +246,8 @@ func TestIPRangeClaim(t *testing.T) {
246246
actual, err := client.RestoreExistingIpRangeByHash(input)
247247

248248
assert.Nil(t, err)
249-
assert.Equal(t, expectedIp_5, actual.StartAddress)
250-
assert.Equal(t, expectedIp_7, actual.EndAddress)
249+
assert.Equal(t, expectedIpDot5, actual.StartAddress)
250+
assert.Equal(t, expectedIpDot7, actual.EndAddress)
251251
})
252252

253253
t.Run("Fail reclaim IP Range if multiple results returned", func(t *testing.T) {
@@ -260,12 +260,12 @@ func TestIPRangeClaim(t *testing.T) {
260260
Previous: nil,
261261
Results: []*netboxModels.IPRange{
262262
{
263-
StartAddress: &expectedIp_5,
264-
EndAddress: &expectedIp_7,
263+
StartAddress: &expectedIpDot5,
264+
EndAddress: &expectedIpDot7,
265265
},
266266
{
267-
StartAddress: &expectedIp_5,
268-
EndAddress: &expectedIp_7,
267+
StartAddress: &expectedIpDot5,
268+
EndAddress: &expectedIpDot7,
269269
},
270270
},
271271
},

tools/.golangci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ linters:
8383
severity: error
8484
disabled: false
8585
staticcheck:
86+
# removed: "IP", "HTTPS", "URL" from defaults
87+
initialisms: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"]
8688
checks:
87-
- -ST1003 # Disable the type naming convention check
88-
- -SA1019
89-
- -SA2002
90-
- ST1019
9189
- all
90+
- -QF1008
91+
- -QF1003
9292
exclusions:
9393
generated: lax
9494
presets:

0 commit comments

Comments
 (0)