diff --git a/config/config.go b/config/config.go index e186028..b9fc91e 100644 --- a/config/config.go +++ b/config/config.go @@ -28,6 +28,12 @@ func DefaultConfig() *Config { }, IgnoredFunctions: []*regexp.Regexp{ regexp.MustCompile(`time.Date`), + regexp.MustCompile(`strconv.FormatInt`), + regexp.MustCompile(`strconv.FormatUint`), + regexp.MustCompile(`strconv.FormatFloat`), + regexp.MustCompile(`strconv.ParseInt`), + regexp.MustCompile(`strconv.ParseUint`), + regexp.MustCompile(`strconv.ParseFloat`), }, } } diff --git a/testdata/src/argument/argument.go b/testdata/src/argument/argument.go index 8b86ff4..518b410 100644 --- a/testdata/src/argument/argument.go +++ b/testdata/src/argument/argument.go @@ -5,6 +5,7 @@ import ( "math" "net/http" "os" + "strconv" "strings" "sync" "time" @@ -92,3 +93,15 @@ func foobaz(numbers ...int) {} func example12() { foobaz(0, 1, 3, 5, 6) // want "Magic number: 3" "Magic number: 5" "Magic number: 6" } + +func example13() { + strconv.FormatInt(10, 32) + strconv.FormatUint(5, 32) + strconv.FormatFloat(5.0, 'E', -1, 32) +} + +func example14() { + _, _ = strconv.ParseInt("10", 10, 64) + _, _ = strconv.ParseUint("5", 10, 64) + _, _ = strconv.ParseFloat("5.0", 32) +}