dgryski / semgrep-go

Go rules for semgrep and go-ruleguard
MIT License
457 stars 37 forks source link

feat: add ruleguard rules for io/ioutil -> io.|os. #38

Closed dnwe closed 3 years ago

dnwe commented 3 years ago

https://pkg.go.dev/io/ioutil

As of Go 1.16/1.17, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.

Thanks to @mvdan and his Quality of life improvements in Go talk for pointing these out as I hadn't spotted them in the release notes myself.

dgryski commented 3 years ago

I'll write an equivalent semgrep rule.

dgryski commented 2 years ago

The semgrep rule: https://github.com/dgryski/semgrep-go/commit/3a7edcf4e67863bdd8955c406d2814dc08fe25b3