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:
parent
a7e4e3bed3
commit
72bcc6911e
12
fixtures/ads-print.go
Normal file
12
fixtures/ads-print.go
Normal 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
11
test/ads-print_test.go
Normal 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{})
|
||||
}
|
Loading…
Reference in New Issue
Block a user