Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / lint_test.go
1 package staticcheck
2
3 import (
4         "testing"
5
6         "honnef.co/go/tools/lint/testutil"
7 )
8
9 func TestAll(t *testing.T) {
10         checks := map[string][]testutil.Test{
11                 "SA1000": {{Dir: "CheckRegexps"}},
12                 "SA1001": {{Dir: "CheckTemplate"}},
13                 "SA1002": {{Dir: "CheckTimeParse"}},
14                 "SA1003": {{Dir: "CheckEncodingBinary"}, {Dir: "CheckEncodingBinary_go17", Version: "1.7"}, {Dir: "CheckEncodingBinary_go18", Version: "1.8"}},
15                 "SA1004": {{Dir: "CheckTimeSleepConstant"}},
16                 "SA1005": {{Dir: "CheckExec"}},
17                 "SA1006": {{Dir: "CheckUnsafePrintf"}},
18                 "SA1007": {{Dir: "CheckURLs"}},
19                 "SA1008": {{Dir: "CheckCanonicalHeaderKey"}},
20                 "SA1010": {{Dir: "checkStdlibUsageRegexpFindAll"}},
21                 "SA1011": {{Dir: "checkStdlibUsageUTF8Cutset"}},
22                 "SA1012": {{Dir: "checkStdlibUsageNilContext"}},
23                 "SA1013": {{Dir: "checkStdlibUsageSeeker"}},
24                 "SA1014": {{Dir: "CheckUnmarshalPointer"}},
25                 "SA1015": {{Dir: "CheckLeakyTimeTick"}, {Dir: "CheckLeakyTimeTick-main"}},
26                 "SA1016": {{Dir: "CheckUntrappableSignal"}},
27                 "SA1017": {{Dir: "CheckUnbufferedSignalChan"}},
28                 "SA1018": {{Dir: "CheckStringsReplaceZero"}},
29                 "SA1019": {{Dir: "CheckDeprecated"}, {Dir: "CheckDeprecated_go14", Version: "1.4"}, {Dir: "CheckDeprecated_go18", Version: "1.8"}},
30                 "SA1020": {{Dir: "CheckListenAddress"}},
31                 "SA1021": {{Dir: "CheckBytesEqualIP"}},
32                 "SA1023": {{Dir: "CheckWriterBufferModified"}},
33                 "SA1024": {{Dir: "CheckNonUniqueCutset"}},
34                 "SA1025": {{Dir: "CheckTimerResetReturnValue"}},
35                 "SA1026": {{Dir: "CheckUnsupportedMarshal"}},
36                 "SA1027": {{Dir: "CheckAtomicAlignment"}},
37                 "SA1028": {{Dir: "CheckSortSlice"}},
38                 "SA1029": {{Dir: "CheckWithValueKey"}},
39                 "SA2000": {{Dir: "CheckWaitgroupAdd"}},
40                 "SA2001": {{Dir: "CheckEmptyCriticalSection"}},
41                 "SA2002": {{Dir: "CheckConcurrentTesting"}},
42                 "SA2003": {{Dir: "CheckDeferLock"}},
43                 "SA3000": {{Dir: "CheckTestMainExit-1"}, {Dir: "CheckTestMainExit-2"}, {Dir: "CheckTestMainExit-3"}, {Dir: "CheckTestMainExit-4"}, {Dir: "CheckTestMainExit-5"}},
44                 "SA3001": {{Dir: "CheckBenchmarkN"}},
45                 "SA4000": {{Dir: "CheckLhsRhsIdentical"}},
46                 "SA4001": {{Dir: "CheckIneffectiveCopy"}},
47                 "SA4003": {{Dir: "CheckExtremeComparison"}},
48                 "SA4004": {{Dir: "CheckIneffectiveLoop"}},
49                 "SA4006": {{Dir: "CheckUnreadVariableValues"}},
50                 "SA4008": {{Dir: "CheckLoopCondition"}},
51                 "SA4009": {{Dir: "CheckArgOverwritten"}},
52                 "SA4010": {{Dir: "CheckIneffectiveAppend"}},
53                 "SA4011": {{Dir: "CheckScopedBreak"}},
54                 "SA4012": {{Dir: "CheckNaNComparison"}},
55                 "SA4013": {{Dir: "CheckDoubleNegation"}},
56                 "SA4014": {{Dir: "CheckRepeatedIfElse"}},
57                 "SA4015": {{Dir: "CheckMathInt"}},
58                 "SA4016": {{Dir: "CheckSillyBitwiseOps"}, {Dir: "CheckSillyBitwiseOps_shadowedIota"}},
59                 "SA4017": {{Dir: "CheckPureFunctions"}},
60                 "SA4018": {{Dir: "CheckSelfAssignment"}},
61                 "SA4019": {{Dir: "CheckDuplicateBuildConstraints"}},
62                 "SA4020": {{Dir: "CheckUnreachableTypeCases"}},
63                 "SA4021": {{Dir: "CheckSingleArgAppend"}},
64                 "SA4022": {{Dir: "CheckAddressIsNil"}},
65                 "SA5000": {{Dir: "CheckNilMaps"}},
66                 "SA5001": {{Dir: "CheckEarlyDefer"}},
67                 "SA5002": {{Dir: "CheckInfiniteEmptyLoop"}},
68                 "SA5003": {{Dir: "CheckDeferInInfiniteLoop"}},
69                 "SA5004": {{Dir: "CheckLoopEmptyDefault"}},
70                 "SA5005": {{Dir: "CheckCyclicFinalizer"}},
71                 "SA5007": {{Dir: "CheckInfiniteRecursion"}},
72                 "SA5008": {{Dir: "CheckStructTags"}, {Dir: "CheckStructTags2"}, {Dir: "CheckStructTags3"}},
73                 "SA5009": {{Dir: "CheckPrintf"}},
74                 "SA5010": {{Dir: "CheckImpossibleTypeAssertion"}},
75                 "SA5011": {{Dir: "CheckMaybeNil"}},
76                 "SA6000": {{Dir: "CheckRegexpMatchLoop"}},
77                 "SA6001": {{Dir: "CheckMapBytesKey"}},
78                 "SA6002": {{Dir: "CheckSyncPoolValue"}},
79                 "SA6003": {{Dir: "CheckRangeStringRunes"}},
80                 "SA6005": {{Dir: "CheckToLowerToUpperComparison"}},
81                 "SA9001": {{Dir: "CheckDubiousDeferInChannelRangeLoop"}},
82                 "SA9002": {{Dir: "CheckNonOctalFileMode"}},
83                 "SA9003": {{Dir: "CheckEmptyBranch"}},
84                 "SA9004": {{Dir: "CheckMissingEnumTypesInDeclaration"}},
85                 "SA9005": {{Dir: "CheckNoopMarshal"}},
86         }
87
88         testutil.Run(t, Analyzers, checks)
89 }