Open dpar39 opened 4 years ago
I think I ran into this while working on a project the other day. I'll look into it soon, hopefully.
At first glance, it shouldn't take too long to fix, but I haven't looked at this extension in a while. It may take longer than I expect.
adding
if (diagnosticMessage.FilePath == tidyResults.MainSourceFile) {
on line 168 of tidy.ts filters out the diagnostics which are not relevant to the current file.
I guess they could be filtered out earlier actually; I havent looked enough to see if they actually serve a purpose.
I believe this is fixed by #30. However, it does mean that warnings that would be displayed incorrectly are no longer being displayed at all. Before I fix this issue, I'd like to do a lot of refactoring. I'm going to defer this until after the next release. That should be Friday.
I think what's happening is that issues found in .h files included in the compilation unit are being shown in .cpp file at the .h FileOffset. Would it be difficult to move the "problems" to the header files so that are shown in it when viewed? By the way, thanks for the VSCode extension. I think what you are targeting with it is the main thing holding VScode to be the best free C++ IDE available.