MCPcopy Create free account

hub / github.com/dgryski/semgrep-go / functions

Functions49 in github.com/dgryski/semgrep-go

MethodHandlePack
(w http.ResponseWriter, r *http.Request)
server/main.go:122
MethodHandleRule
TODO(dgryski): These responses should really be precomputed and cached rather than computed on-the-fly
server/main.go:105
Functionbadexponent
(m dsl.Matcher)
ruleguard.rules.go:255
Functionbadlock
(m dsl.Matcher)
ruleguard.rules.go:426
Functionconstswitch
(m dsl.Matcher)
ruleguard.rules.go:179
FunctioncontextTODO
(m dsl.Matcher)
ruleguard.rules.go:457
Functionerrnetclosed
(m dsl.Matcher)
ruleguard.rules.go:382
Functionerrnoterror
err but no an error
ruleguard.rules.go:45
Functionfloateq
(m dsl.Matcher)
ruleguard.rules.go:230
Functionfloatloop
(m dsl.Matcher)
ruleguard.rules.go:263
Functionfmtfprint
(m dsl.Matcher)
ruleguard.rules.go:420
Functionhmacnew
(m dsl.Matcher)
ruleguard.rules.go:392
Functionidenticalassignments
odd sequence of assignments
ruleguard.rules.go:165
Functionifbodythenbody
Identical if and else bodies
ruleguard.rules.go:71
Functionifreturn
odd sequence of if tests with return
ruleguard.rules.go:130
FunctionioStringWriterWriteStringMisuse
(m dsl.Matcher)
ruleguard.rules.go:556
FunctionioWriterWriteMisuse
(m dsl.Matcher)
ruleguard.rules.go:542
FunctionioutilDiscard
ioutil.Discard => io.Discard
ruleguard.rules.go:470
FunctionioutilNopCloser
ioutil.NopCloser => io.NopCloser
ruleguard.rules.go:479
FunctionioutilReadAll
ioutil.ReadAll => io.ReadAll
ruleguard.rules.go:488
FunctionioutilReadDir
ioutil.ReadDir => os.ReadDir
ruleguard.rules.go:497
FunctionioutilReadFile
ioutil.ReadFile => os.ReadFile
ruleguard.rules.go:506
FunctionioutilTempDir
ioutil.TempDir => os.MkdirTemp
ruleguard.rules.go:515
FunctionioutilTempFile
ioutil.TempFile => os.CreateTemp
ruleguard.rules.go:524
FunctionioutilWriteFile
ioutil.WriteFile => os.WriteFile
ruleguard.rules.go:533
Functionjoinpath
(m dsl.Matcher)
ruleguard.rules.go:316
Functionlargeloopcopy
(m dsl.Matcher)
ruleguard.rules.go:308
FunctionlenByteSliceStr
(m dsl.Matcher)
ruleguard.rules.go:572
FunctionlenStrByteSlice
(m dsl.Matcher)
ruleguard.rules.go:564
Functionmailaddress
(m dsl.Matcher)
ruleguard.rules.go:366
Functionmain
()
server/main.go:25
Functionnestedifsequence
odd sequence of nested if tests
ruleguard.rules.go:155
Functionnilerr
(m dsl.Matcher)
ruleguard.rules.go:357
Functionoddbitwise
odd bitwise expressions
ruleguard.rules.go:114
Functionoddcomparisons
oddcomparisons flags comparisons which all have simpler equivalents with just $x and $y and no zero term
ruleguard.rules.go:187
Functionoddcompoundop
(m dsl.Matcher)
ruleguard.rules.go:169
Functionoddifsequence
(m dsl.Matcher)
ruleguard.rules.go:139
Functionoddmathbits
(m dsl.Matcher)
ruleguard.rules.go:221
Functionoddnestedif
Odd nested ifs
ruleguard.rules.go:97
Functionreadeof
(m dsl.Matcher)
ruleguard.rules.go:401
Functionreadfull
(m dsl.Matcher)
ruleguard.rules.go:325
Functionselfassign
Odd inequality: A - B < 0 instead of != Too many false positives. * func subtractnoteq(m dsl.Matcher) { m.Match("$a - $b < 0").Report("consider $a !=
ruleguard.rules.go:92
FunctionsetenvUsedInTests
(m dsl.Matcher)
ruleguard.rules.go:447
Functionsprinterr
(m dsl.Matcher)
ruleguard.rules.go:298
Functiontimeeq
Don't use == or != with time.Time https://github.com/dominikh/go-tools/issues/47 : Wontfix
ruleguard.rules.go:38
Functionunconvert
This is a collection of rules for ruleguard: https://github.com/quasilyte/go-ruleguard Remove extra conversions: mdempsky/unconvert
ruleguard.rules.go:11
Functionurlredacted
(m dsl.Matcher)
ruleguard.rules.go:279
Functionwritestring
(m dsl.Matcher)
ruleguard.rules.go:414
Functionwrongerrcall
(m dsl.Matcher)
ruleguard.rules.go:461