You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/analysis/integers/testdata/src/a/a.go
+29-29Lines changed: 29 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -13,39 +13,39 @@ type Integers struct {
13
13
14
14
ValidInt64Ptr*int64
15
15
16
-
InvalidIntint// want "field InvalidInt should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
16
+
InvalidIntint// want "field Integers.InvalidInt should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
17
17
18
-
InvalidIntPtr*int// want "field InvalidIntPtr pointer should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
18
+
InvalidIntPtr*int// want "field Integers.InvalidIntPtr pointer should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
19
19
20
-
InvalidInt8int8// want "field InvalidInt8 should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
20
+
InvalidInt8int8// want "field Integers.InvalidInt8 should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
21
21
22
-
InvalidInt16int16// want "field InvalidInt16 should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
22
+
InvalidInt16int16// want "field Integers.InvalidInt16 should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
23
23
24
-
InvalidUIntuint// want "field InvalidUInt should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
24
+
InvalidUIntuint// want "field Integers.InvalidUInt should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
25
25
26
-
InvalidUIntPtruint// want "field InvalidUIntPtr should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
26
+
InvalidUIntPtruint// want "field Integers.InvalidUIntPtr should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
27
27
28
-
InvalidUInt8uint8// want "field InvalidUInt8 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
28
+
InvalidUInt8uint8// want "field Integers.InvalidUInt8 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
29
29
30
-
InvalidUInt16uint16// want "field InvalidUInt16 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
30
+
InvalidUInt16uint16// want "field Integers.InvalidUInt16 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
31
31
32
-
InvalidUInt32uint32// want "field InvalidUInt32 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
32
+
InvalidUInt32uint32// want "field Integers.InvalidUInt32 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
33
33
34
-
InvalidUInt64uint64// want "field InvalidUInt64 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
34
+
InvalidUInt64uint64// want "field Integers.InvalidUInt64 should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
35
35
36
36
ValidInt32AliasValidInt32Alias
37
37
38
38
ValidInt32AliasPtr*ValidInt32Alias
39
39
40
-
InvalidIntAliasInvalidIntAlias// want "field InvalidIntAlias type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
40
+
InvalidIntAliasInvalidIntAlias// want "field Integers.InvalidIntAlias type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
41
41
42
-
InvalidIntAliasPtr*InvalidIntAlias// want "field InvalidIntAliasPtr pointer type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
42
+
InvalidIntAliasPtr*InvalidIntAlias// want "field Integers.InvalidIntAliasPtr pointer type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
43
43
44
-
InvalidUIntAliasInvalidUIntAlias// want "field InvalidUIntAlias type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
44
+
InvalidUIntAliasInvalidUIntAlias// want "field Integers.InvalidUIntAlias type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
45
45
46
-
InvalidUIntAliasPtr*InvalidUIntAlias// want "field InvalidUIntAliasPtr pointer type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
46
+
InvalidUIntAliasPtr*InvalidUIntAlias// want "field Integers.InvalidUIntAliasPtr pointer type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
47
47
48
-
InvalidIntAliasAliasInvalidIntAliasAlias// want "field InvalidIntAliasAlias type InvalidIntAliasAlias type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
48
+
InvalidIntAliasAliasInvalidIntAliasAlias// want "field Integers.InvalidIntAliasAlias type InvalidIntAliasAlias type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
49
49
50
50
ValidSliceInt32 []int32
51
51
@@ -55,41 +55,41 @@ type Integers struct {
55
55
56
56
ValidSliceInt64Ptr []*int64
57
57
58
-
InvalidSliceInt []int// want "field InvalidSliceInt array element should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
58
+
InvalidSliceInt []int// want "field Integers.InvalidSliceInt array element should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
59
59
60
-
InvalidSliceIntPtr []*int// want "field InvalidSliceIntPtr array element pointer should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
60
+
InvalidSliceIntPtr []*int// want "field Integers.InvalidSliceIntPtr array element pointer should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
61
61
62
-
InvalidSliceUInt []uint// want "field InvalidSliceUInt array element should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
62
+
InvalidSliceUInt []uint// want "field Integers.InvalidSliceUInt array element should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
63
63
64
-
InvalidSliceUIntPtr []*uint// want "field InvalidSliceUIntPtr array element pointer should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
64
+
InvalidSliceUIntPtr []*uint// want "field Integers.InvalidSliceUIntPtr array element pointer should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
65
65
66
-
InvalidSliceIntAlias []InvalidIntAlias// want "field InvalidSliceIntAlias array element type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
66
+
InvalidSliceIntAlias []InvalidIntAlias// want "field Integers.InvalidSliceIntAlias array element type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
67
67
68
-
InvalidSliceIntAliasPtr []*InvalidIntAlias// want "field InvalidSliceIntAliasPtr array element pointer type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
68
+
InvalidSliceIntAliasPtr []*InvalidIntAlias// want "field Integers.InvalidSliceIntAliasPtr array element pointer type InvalidIntAlias should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
69
69
70
-
InvalidSliceUIntAlias []InvalidUIntAlias// want "field InvalidSliceUIntAlias array element type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
70
+
InvalidSliceUIntAlias []InvalidUIntAlias// want "field Integers.InvalidSliceUIntAlias array element type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
71
71
72
-
InvalidSliceUIntAliasPtr []*InvalidUIntAlias// want "field InvalidSliceUIntAliasPtr array element pointer type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
72
+
InvalidSliceUIntAliasPtr []*InvalidUIntAlias// want "field Integers.InvalidSliceUIntAliasPtr array element pointer type InvalidUIntAlias should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
73
73
74
74
ValidMapStringToInt32map[string]int32
75
75
76
76
ValidMapStringToInt64map[string]int64
77
77
78
-
InvalidMapStringToIntmap[string]int// want "field InvalidMapStringToInt map value should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
78
+
InvalidMapStringToIntmap[string]int// want "field Integers.InvalidMapStringToInt map value should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
79
79
80
-
InvalidMapStringToUIntmap[string]uint// want "field InvalidMapStringToUInt map value should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
80
+
InvalidMapStringToUIntmap[string]uint// want "field Integers.InvalidMapStringToUInt map value should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
81
81
82
82
ValidMapInt32ToStringmap[int32]string
83
83
84
84
ValidMapInt64ToStringmap[int64]string
85
85
86
-
InvalidMapIntToStringmap[int]string// want "field InvalidMapIntToString map key should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
86
+
InvalidMapIntToStringmap[int]string// want "field Integers.InvalidMapIntToString map key should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
87
87
88
-
InvalidMapUIntToStringmap[uint]string// want "field InvalidMapUIntToString map key should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
88
+
InvalidMapUIntToStringmap[uint]string// want "field Integers.InvalidMapUIntToString map key should not use unsigned integers, use only int32 or int64 and apply validation to ensure the value is positive"
89
89
90
-
InvalidIntFromAnotherFileIntB// want "field InvalidIntFromAnotherFile type IntB should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
90
+
InvalidIntFromAnotherFileIntB// want "field Integers.InvalidIntFromAnotherFile type IntB should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
91
91
92
-
InvalidSliceIntAliasFromAnotherFileInvalidSliceIntAliasB// want "field InvalidSliceIntAliasFromAnotherFile type InvalidSliceIntAliasB array element should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
92
+
InvalidSliceIntAliasFromAnotherFileInvalidSliceIntAliasB// want "field Integers.InvalidSliceIntAliasFromAnotherFile type InvalidSliceIntAliasB array element should not use an int, int8 or int16. Use int32 or int64 depending on bounding requirements"
93
93
}
94
94
95
95
// DoNothing is used to check that the analyser doesn't report on methods.
Copy file name to clipboardExpand all lines: pkg/analysis/nobools/testdata/src/a/a.go
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -9,33 +9,33 @@ type Bools struct {
9
9
10
10
ValidInt64int64
11
11
12
-
InvalidBoolbool// want "field InvalidBool should not use a bool. Use a string type with meaningful constant values as an enum."
12
+
InvalidBoolbool// want "field Bools.InvalidBool should not use a bool. Use a string type with meaningful constant values as an enum."
13
13
14
-
InvalidBoolPtr*bool// want "field InvalidBoolPtr pointer should not use a bool. Use a string type with meaningful constant values as an enum."
14
+
InvalidBoolPtr*bool// want "field Bools.InvalidBoolPtr pointer should not use a bool. Use a string type with meaningful constant values as an enum."
15
15
16
-
InvalidBoolSlice []bool// want "field InvalidBoolSlice array element should not use a bool. Use a string type with meaningful constant values as an enum."
16
+
InvalidBoolSlice []bool// want "field Bools.InvalidBoolSlice array element should not use a bool. Use a string type with meaningful constant values as an enum."
17
17
18
-
InvalidBoolPtrSlice []*bool// want "field InvalidBoolPtrSlice array element pointer should not use a bool. Use a string type with meaningful constant values as an enum."
18
+
InvalidBoolPtrSlice []*bool// want "field Bools.InvalidBoolPtrSlice array element pointer should not use a bool. Use a string type with meaningful constant values as an enum."
19
19
20
-
InvalidBoolAliasBoolAlias// want "field InvalidBoolAlias type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
20
+
InvalidBoolAliasBoolAlias// want "field Bools.InvalidBoolAlias type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
21
21
22
-
InvalidBoolPtrAlias*BoolAlias// want "field InvalidBoolPtrAlias pointer type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
22
+
InvalidBoolPtrAlias*BoolAlias// want "field Bools.InvalidBoolPtrAlias pointer type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
23
23
24
-
InvalidBoolSliceAlias []BoolAlias// want "field InvalidBoolSliceAlias array element type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
24
+
InvalidBoolSliceAlias []BoolAlias// want "field Bools.InvalidBoolSliceAlias array element type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
25
25
26
-
InvalidBoolPtrSliceAlias []*BoolAlias// want "field InvalidBoolPtrSliceAlias array element pointer type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
26
+
InvalidBoolPtrSliceAlias []*BoolAlias// want "field Bools.InvalidBoolPtrSliceAlias array element pointer type BoolAlias should not use a bool. Use a string type with meaningful constant values as an enum."
27
27
28
-
InvalidMapStringToBoolmap[string]bool// want "field InvalidMapStringToBool map value should not use a bool. Use a string type with meaningful constant values as an enum."
28
+
InvalidMapStringToBoolmap[string]bool// want "field Bools.InvalidMapStringToBool map value should not use a bool. Use a string type with meaningful constant values as an enum."
29
29
30
-
InvalidMapStringToBoolPtrmap[string]*bool// want "field InvalidMapStringToBoolPtr map value pointer should not use a bool. Use a string type with meaningful constant values as an enum."
30
+
InvalidMapStringToBoolPtrmap[string]*bool// want "field Bools.InvalidMapStringToBoolPtr map value pointer should not use a bool. Use a string type with meaningful constant values as an enum."
31
31
32
-
InvalidMapBoolToStringmap[bool]string// want "field InvalidMapBoolToString map key should not use a bool. Use a string type with meaningful constant values as an enum."
32
+
InvalidMapBoolToStringmap[bool]string// want "field Bools.InvalidMapBoolToString map key should not use a bool. Use a string type with meaningful constant values as an enum."
33
33
34
-
InvalidMapBoolPtrToStringmap[*bool]string// want "field InvalidMapBoolPtrToString map key pointer should not use a bool. Use a string type with meaningful constant values as an enum."
34
+
InvalidMapBoolPtrToStringmap[*bool]string// want "field Bools.InvalidMapBoolPtrToString map key pointer should not use a bool. Use a string type with meaningful constant values as an enum."
35
35
36
-
InvalidBoolAliasFromAnotherFileBoolAliasB// want "field InvalidBoolAliasFromAnotherFile type BoolAliasB should not use a bool. Use a string type with meaningful constant values as an enum."
36
+
InvalidBoolAliasFromAnotherFileBoolAliasB// want "field Bools.InvalidBoolAliasFromAnotherFile type BoolAliasB should not use a bool. Use a string type with meaningful constant values as an enum."
37
37
38
-
InvalidBoolPtrAliasFromAnotherFile*BoolAliasB// want "field InvalidBoolPtrAliasFromAnotherFile pointer type BoolAliasB should not use a bool. Use a string type with meaningful constant values as an enum."
38
+
InvalidBoolPtrAliasFromAnotherFile*BoolAliasB// want "field Bools.InvalidBoolPtrAliasFromAnotherFile pointer type BoolAliasB should not use a bool. Use a string type with meaningful constant values as an enum."
39
39
}
40
40
41
41
// DoNothing is used to check that the analyser doesn't report on methods.
0 commit comments