WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 717a269

Browse files
shamatonMasayuki Shamoto
authored andcommitted
nolint setting
1 parent f7e1540 commit 717a269

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: "2"
2+
3+
linters:
4+
exclusions:
5+
rules:
6+
- linters: [staticcheck]
7+
text: ST1001

msgpack/enc/byte.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func (e *Encoder) CalcByte(b byte) int {
3939
}
4040

4141
// WriteByte sets the contents of v to the buffer.
42+
//nolint:govet // custom WriteByte signature is intentional (used only by generated code)
4243
func (e *Encoder) WriteByte(b byte, offset int) int {
4344
return e.setByte(b, offset)
4445
}

msgpack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ func TestStruct(t *testing.T) {
11441144
if !reflect.DeepEqual(v.A, v1.A) || !reflect.DeepEqual(v.A, v2.A) {
11451145
t.Error("value different", v.A, v1.A, v2.A)
11461146
}
1147-
if v.A.B.Int != v1.B.Int || v.B.Int != v2.A.B.Int {
1147+
if v.A.B.Int != v1.B.Int || v.B.Int != v2.A.B.Int { //nolint:staticcheck // keeping "A" explicit for clarity
11481148
t.Error("value something wrong", v.A.Int, v1.Int, v2.Int)
11491149
}
11501150
if v.A.Int == v1.Int || v.A.Int == v2.Int {

0 commit comments

Comments
 (0)