-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider to support more strconv
functions
#3
Comments
As mentioned in #2 this linter is more about Where do you see
|
The first ones that came to mind: fmt.Sprintf(`"%s"`, "hello")
fmt.Sprintf("%q", "hello")
strconv.Quote("hello")
`"` + "hello" + `"` fmt.Sprintf("`%s`", "hello")
fmt.Sprintf("%#q", "hello")
"`" + "hello" + "`" fmt.Sprintf("%q", 91)
"'['" strings.Trim(`"hello"`, `"`)
strconv.Unquote(`"hello"`) fmt.Sprintf("%f", 42.42) // And a lot of other verbs.
strconv.FormatFloat(42.42, 'f', 6, 64) fmt.Println(fmt.Sprintf("%e", 42i+42)) // And other verbs.
fmt.Println(strconv.FormatComplex(42i+42, 'e', 6, 64)) |
Not all are equivalent cf https://go.dev/play/p/9s4GhmIBEz_J What I see in some codebase is fmt.Sprintf("constantstring%s" like |
What about ea8b325 ? |
Offtop: Please, make a PR in the next time :) |
Offtopic: The latest version (v0.2.2) contains features and breaking changes but the version was increased as a bug fix. It's better for us if you follow semver:
|
Thanks @ldez I did 0.2.1 as suggested here |
Yes, sorry for the confusion, I suggested a patch version because I didn't consider the flag as a new feature (with a default value equal to the existing behavior). I didn't know about other changes. |
@catenacyber about ea8b325
Also we already have the similar checks:
And this is another one reason for pull requests instead of commits. Anyway, as u wish. |
Ok, adding an option to configure this
Indeed, and I hope |
Eheh, perfsprint will optimize the Interesting Looks a different class
I have been doing that since |
Is there something clear to do her e? |
Thanks for feedback and related changes 🙏 |
Hi!
Maybe you will be interested in:
The text was updated successfully, but these errors were encountered: