nvim-lint
nvim-lint copied to clipboard
Normalize the file path in the diagnostics result
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.