1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00

ads-print final version

This commit is contained in:
chavacava 2018-06-29 13:27:12 +02:00
parent a7e4e3bed3
commit 72bcc6911e
2 changed files with 23 additions and 0 deletions

12
fixtures/ads-print.go Normal file
View File

@ -0,0 +1,12 @@
package fixtures
import (
"fmt"
)
func foo(a, b, c, d int) {
fmt.Print("bad") // MATCH /do not call fmt.Print, use logger/
fmt.Println("bad") // MATCH /do not call fmt.Println, use logger/
fmt.Printf("%s", "bad") // MATCH /do not call fmt.Printf, use logger/
fmt.Sprint("ss")
}

11
test/ads-print_test.go Normal file
View File

@ -0,0 +1,11 @@
package test
import (
"testing"
"github.com/mgechev/revive/rule"
)
func TestADSPrint(t *testing.T) {
testRule(t, "ads-print", &rule.ADSPrintRule{})
}