1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00
Files
revive/test/use_fmt_print_test.go
chavacava 6becd540e4 feature: new rule use-fmt-print (#1389)
print and println built-in functions are not recommended for use-cases other than language boostraping and are not guaranteed to stay in the language.

This commit adds a new rule, use-fmt-print, that spots uses of print and println, and recommends using their fmt equivalents.
2025-05-28 12:57:37 +02:00

13 lines
239 B
Go

package test
import (
"testing"
"github.com/mgechev/revive/rule"
)
func TestUseFmtPrint(t *testing.T) {
testRule(t, "use_fmt_print", &rule.UseFmtPrintRule{})
testRule(t, "use_fmt_print_with_redefinition", &rule.UseFmtPrintRule{})
}