nvim-lint icon indicating copy to clipboard operation
nvim-lint copied to clipboard

Normalize the file path in the diagnostics result

Open markvincze opened this issue 2 months ago • 0 comments

The diagnostic with golangci-lint was not working for me at all, because the compared paths were different, they had values like this:

curfile_norm:      C:/Workspaces/my-project/my-file.go
item.Pos.Filename: C:\Workspaces\my-project\my-file.go
lintedfile_norm:   C:/Workspaces/my-project/C:/Workspaces/my-project/my-file.go

None of these matched, so the diagnostic results were discarded. Normalizing item.Pos.Filename as well in the condition fixes the issue.

markvincze avatar Dec 13 '25 16:12 markvincze