-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Variable name only replaced once #18
Comments
First, it's not a new behavior. I have a minimal reproducible example: package temp
import (
"fmt"
"os"
)
func foo() {
smoe, _ := os.Open("test") // Detected
defer smoe.Close() // Not detected
fmt.Println(smoe) // Detected
fmt.Println(smoe.Name()) // Not detected
} $ go run ./cmd/misspell ./temp
temp/temp.go:9:1: "smoe" is a misspelling of "some"
temp/temp.go:12:13: "smoe" is a misspelling of "some" |
It's a side effect/false negative of the host parsing. |
Ah yes, then it's an existing bug that wasn't noticed so far. |
This has been the same behavior for the past 8 years, the goal being to avoid false positives. |
I can improve a bit by following some basic domain name rules, but it's impossible to fully fix that without creating a regression. |
Fine with me, those cases are easy enough to correct manually. |
I improved hostname detection as I explained before. Now, I created a v0.5.1 As the problem cannot be fully fixed, I will close this issue. |
Thanks, I can confirm it new replaced these missing cases, even without having reset the diff :) |
Running with the
-dict
option and passingcommiter,committer
, I see the variable only got replaced once on the first occurence, instead of all occurences in go code. I think it should have replaced on line 248 too here:Is it expected?
Ref: go-gitea/gitea#30573
The text was updated successfully, but these errors were encountered: