Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Code inspection using Shared Items Project
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alex.postlethwaite
Senior Member

38 Posts

Posted - Mar 24 2017 :  11:38:29 AM  Show Profile  Reply with Quote
Hi,

We are using C++ Shared Items Projects (https://blogs.msdn.microsoft.com/vcblog/2015/07/30/cross-platform-code-sharing-with-visual-c/) to shared code between multiple projects.

We don't seem to get code inspection results from files contained in the Shared Project.

From another thread, I enabled logging and looking at VaCodeInspections.log.

When opening files that fail to analyse, I see these messages:

----

ERROR: Exception: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))
Callstack = at EnvDTE.ConfigurationManager.get_ActiveConfiguration()

at dv.c(ITextBuffer A_0)


----

Is it possible for it to work for these projects?

Please see an attachment exhibiting this issue.

If you open App1.cpp or App2.cpp you can see an issue regarding 0 -> nullptr change.

If you open SharedHeader.h, the same code exists, but analysis does not complete.

Thanks,
Alex

Edited by - alex.postlethwaite on Mar 24 2017 11:40:23 AM

alex.postlethwaite
Senior Member

38 Posts

Posted - Mar 24 2017 :  11:39:54 AM  Show Profile  Reply with Quote
Just realised I can only attach images.

Do you need the example or do you have enough information?

Thanks,
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Mar 24 2017 :  3:05:04 PM  Show Profile  Reply with Quote
Hi Alex, thanks for reporting this. I think that's enough info for me to investigate, but I'll let you know if I need anything more.

Whole Tomato Software
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Mar 24 2017 :  4:54:54 PM  Show Profile  Reply with Quote
I've managed to reproduce the problem, and I've opened a bug report case=104861.

Whole Tomato Software
Go to Top of Page

alex.postlethwaite
Senior Member

38 Posts

Posted - Mar 27 2017 :  06:43:15 AM  Show Profile  Reply with Quote
quote:
Originally posted by holedigger

I've managed to reproduce the problem, and I've opened a bug report case=104861.



Great, thanks.

Due to the way shared items projects work, I can imagine a situation where the code analysis returns different results depending on the configuration of the project that the shared code is being referenced by (e.g. macro in AppA but not in AppB).

If possible, I suppose I'd like to see all possible issues (which might require parsing the file several times).

If the ambiguity about which configuration caused the defect needs to be visible, a Project|Config column in the inspection results window could work.

Or maybe you've already got a neat way of solving it, either way, look forward to a fix as we have a significant amount of our shared code in these kinds of projects now.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 26 2017 :  5:04:03 PM  Show Profile  Reply with Quote
case=104861 is fixed in build 2217.
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Apr 26 2017 :  5:55:22 PM  Show Profile  Reply with Quote
Code Inspection currently honors the active configuration (eg, Debug|Win32), as well as the active shared project context in the VS Navigation bar.

Whole Tomato Software
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000