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 issues

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
jschroedl Posted - Mar 14 2017 : 10:51:03 AM
Should I expect Code Inspection to suggest any improvements in my .cpp files compiled with /clr? I'm guessing No but would love to be surprised.

FWIW, the Code Inspection View does not offer any suggestions in ANY of my projects (/clr or Native). So something seems wrong with it. I do have inspection enabled in the options but nothing ever shows in the window.

I tried a super-simple test case with iterating a std::vector and no suggestion to move to range-for showed up. Is there diagnostic output I could look at to know why it's baffled by our code?
9   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Mar 24 2017 : 10:19:32 PM
case=104545 is fixed in build 2212.
jschroedl Posted - Mar 17 2017 : 10:28:42 AM
A follow-up for folks.

With our offline triage, we were able to get Code Inspection working for my project. I don't know what code needs to change in VA and there may be a future update to help fix this but the workaround for me in the meantime is to disable the experimental Fast Project Load feature MS added for C++ projects. Disabling that option enables Code Inspection to work and it's fantastic!

I have to add a huge thank you to the Visual Assist developer for helping get me going so quickly. It's great support like this which has kept me happily renewing my VA license for 10 years!

I'll also point out that while it may not be officially supported there, CI did point out some valid fixes to my C++/CLI code. Bonus!
holedigger Posted - Mar 15 2017 : 12:48:13 PM
Thanks, I got the project, and will be contacting you through email. (case=104545)
jschroedl Posted - Mar 15 2017 : 10:41:59 AM
Great. I submitted a zip with our sln and various project files.
feline Posted - Mar 15 2017 : 10:33:05 AM
You can submit the files via the form:

http://www.wholetomato.com/support/contact.asp

please including this thread ID or URL in the description, so we can match it up.
jschroedl Posted - Mar 15 2017 : 08:02:55 AM
I enabled the logging and opened the cpp file with my DllMain, waited a while, exited and here's what it wrote:

[BegTask 68.1] UnmapFileContents
[EndTask 68.1] 0ms

Since it's so short, I repeated the process with another file and the results seem pretty much the same.

[BegTask 3.1] UnmapFileContents
[EndTask 3.1] 0ms

I can share the projects with you if there's a private location I can put them.

John
holedigger Posted - Mar 14 2017 : 4:10:51 PM
I would have expected it to work in your native projects, so I need to figure out if it is actually parsing your code (a problem parsing the code) or not (a problem examining the project file).

- close all open editor windows
- enable logging in the VA options dialog (Performance -> Enable logging)
- open a .cpp file from your exe project
- wait a few seconds, then close VS
- look for the log file VaCodeInspections.log in your temp directory, probably
C:\Users\username\AppData\Local\Temp\VaCodeInspections.log
If we are parsing the file, you'll see the file listed in the log file.

If it is a project-reading problem are you able to send us project files (don't need source files, just project files)?

Thanks!
jschroedl Posted - Mar 14 2017 : 3:09:48 PM
My solution has 16 projects. One is the /clr assembly I mentioned, one is C# assembly, one Win32 resource DLL, a native C++ executable and the rest are static C++ libraries.

I'm mainly hoping for the inspector to work in the native exe project.

Starting simple, I added the int* p = 0; to my resource file entry point. DllMain is all it really has and no suggestions are shown there.

If I start an empty solution and add simple cases like yours or my vector example, I DO see the results as expected.



holedigger Posted - Mar 14 2017 : 2:02:07 PM
Currently we don't analyze files compiled with /clr.

If your projects are Makefile projects, we do have a bug that's preventing us from parsing. Otherwise, can you tell me more about your projects?
Which version of VS are you using?
If you create a new console app project and add "int *ptr = 0;" do you get any results?

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