mirror of
https://github.com/mgechev/revive.git
synced 2025-12-05 22:53:41 +02:00
fix(1323): false positive in get-return rule for HTTP Get handlers (#1325)
This commit is contained in:
9
testdata/get_return.go
vendored
9
testdata/get_return.go
vendored
@@ -1,5 +1,7 @@
|
||||
package fixtures
|
||||
|
||||
import "net/http"
|
||||
|
||||
func getfoo() {
|
||||
|
||||
}
|
||||
@@ -27,3 +29,10 @@ func (t *t) GetSaz(a string, b int) { // MATCH /function 'GetSaz' seems to be a
|
||||
func GetQux(a string, b int, c int, d string, e int64) { // MATCH /function 'GetQux' seems to be a getter but it does not return any result/
|
||||
|
||||
}
|
||||
|
||||
// non-regression test issue #1323
|
||||
func (b *t) GetInfo(w http.ResponseWriter, r *http.Request) {}
|
||||
|
||||
func GetSomething(w http.ResponseWriter, r *http.Request, p int) {}
|
||||
|
||||
func GetSomethingElse(p int, w http.ResponseWriter, r *http.Request) {} // MATCH /function 'GetSomethingElse' seems to be a getter but it does not return any result/
|
||||
|
||||
Reference in New Issue
Block a user