Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Code inspection using Shared Items Project

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
alex.postlethwaite Posted - Mar 24 2017 : 11:38:29 AM
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
6   L A T E S T    R E P L I E S    (Newest First)
holedigger Posted - Apr 26 2017 : 5:55:22 PM
Code Inspection currently honors the active configuration (eg, Debug|Win32), as well as the active shared project context in the VS Navigation bar.
sean Posted - Apr 26 2017 : 5:04:03 PM
case=104861 is fixed in build 2217.
alex.postlethwaite Posted - Mar 27 2017 : 06:43:15 AM
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.
holedigger Posted - Mar 24 2017 : 4:54:54 PM
I've managed to reproduce the problem, and I've opened a bug report case=104861.
holedigger Posted - Mar 24 2017 : 3:05:04 PM
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.
alex.postlethwaite Posted - Mar 24 2017 : 11:39:54 AM
Just realised I can only attach images.

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

Thanks,

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000