Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dgryski/semgrep-go
/ functions
Functions
49 in github.com/dgryski/semgrep-go
⨍
Functions
49
◇
Types & classes
4
Method
HandlePack
(w http.ResponseWriter, r *http.Request)
server/main.go:122
Method
HandleRule
TODO(dgryski): These responses should really be precomputed and cached rather than computed on-the-fly
server/main.go:105
Function
badexponent
(m dsl.Matcher)
ruleguard.rules.go:255
Function
badlock
(m dsl.Matcher)
ruleguard.rules.go:426
Function
constswitch
(m dsl.Matcher)
ruleguard.rules.go:179
Function
contextTODO
(m dsl.Matcher)
ruleguard.rules.go:457
Function
errnetclosed
(m dsl.Matcher)
ruleguard.rules.go:382
Function
errnoterror
err but no an error
ruleguard.rules.go:45
Function
floateq
(m dsl.Matcher)
ruleguard.rules.go:230
Function
floatloop
(m dsl.Matcher)
ruleguard.rules.go:263
Function
fmtfprint
(m dsl.Matcher)
ruleguard.rules.go:420
Function
hmacnew
(m dsl.Matcher)
ruleguard.rules.go:392
Function
identicalassignments
odd sequence of assignments
ruleguard.rules.go:165
Function
ifbodythenbody
Identical if and else bodies
ruleguard.rules.go:71
Function
ifreturn
odd sequence of if tests with return
ruleguard.rules.go:130
Function
ioStringWriterWriteStringMisuse
(m dsl.Matcher)
ruleguard.rules.go:556
Function
ioWriterWriteMisuse
(m dsl.Matcher)
ruleguard.rules.go:542
Function
ioutilDiscard
ioutil.Discard => io.Discard
ruleguard.rules.go:470
Function
ioutilNopCloser
ioutil.NopCloser => io.NopCloser
ruleguard.rules.go:479
Function
ioutilReadAll
ioutil.ReadAll => io.ReadAll
ruleguard.rules.go:488
Function
ioutilReadDir
ioutil.ReadDir => os.ReadDir
ruleguard.rules.go:497
Function
ioutilReadFile
ioutil.ReadFile => os.ReadFile
ruleguard.rules.go:506
Function
ioutilTempDir
ioutil.TempDir => os.MkdirTemp
ruleguard.rules.go:515
Function
ioutilTempFile
ioutil.TempFile => os.CreateTemp
ruleguard.rules.go:524
Function
ioutilWriteFile
ioutil.WriteFile => os.WriteFile
ruleguard.rules.go:533
Function
joinpath
(m dsl.Matcher)
ruleguard.rules.go:316
Function
largeloopcopy
(m dsl.Matcher)
ruleguard.rules.go:308
Function
lenByteSliceStr
(m dsl.Matcher)
ruleguard.rules.go:572
Function
lenStrByteSlice
(m dsl.Matcher)
ruleguard.rules.go:564
Function
mailaddress
(m dsl.Matcher)
ruleguard.rules.go:366
Function
main
()
server/main.go:25
Function
nestedifsequence
odd sequence of nested if tests
ruleguard.rules.go:155
Function
nilerr
(m dsl.Matcher)
ruleguard.rules.go:357
Function
oddbitwise
odd bitwise expressions
ruleguard.rules.go:114
Function
oddcomparisons
oddcomparisons flags comparisons which all have simpler equivalents with just $x and $y and no zero term
ruleguard.rules.go:187
Function
oddcompoundop
(m dsl.Matcher)
ruleguard.rules.go:169
Function
oddifsequence
(m dsl.Matcher)
ruleguard.rules.go:139
Function
oddmathbits
(m dsl.Matcher)
ruleguard.rules.go:221
Function
oddnestedif
Odd nested ifs
ruleguard.rules.go:97
Function
readeof
(m dsl.Matcher)
ruleguard.rules.go:401
Function
readfull
(m dsl.Matcher)
ruleguard.rules.go:325
Function
selfassign
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
Function
setenvUsedInTests
(m dsl.Matcher)
ruleguard.rules.go:447
Function
sprinterr
(m dsl.Matcher)
ruleguard.rules.go:298
Function
timeeq
Don't use == or != with time.Time https://github.com/dominikh/go-tools/issues/47 : Wontfix
ruleguard.rules.go:38
Function
unconvert
This is a collection of rules for ruleguard: https://github.com/quasilyte/go-ruleguard Remove extra conversions: mdempsky/unconvert
ruleguard.rules.go:11
Function
urlredacted
(m dsl.Matcher)
ruleguard.rules.go:279
Function
writestring
(m dsl.Matcher)
ruleguard.rules.go:414
Function
wrongerrcall
(m dsl.Matcher)
ruleguard.rules.go:461