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 issues
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jschroedl
Tomato Guru

USA
103 Posts

Posted - Mar 14 2017 :  10:51:03 AM  Show Profile  Reply with Quote
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?

Edited by - jschroedl on Mar 14 2017 11:08:05 AM

holedigger
Whole Tomato Software

145 Posts

Posted - Mar 14 2017 :  2:02:07 PM  Show Profile  Reply with Quote
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?

Whole Tomato Software
Go to Top of Page

jschroedl
Tomato Guru

USA
103 Posts

Posted - Mar 14 2017 :  3:09:48 PM  Show Profile  Reply with Quote
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.



Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Mar 14 2017 :  4:10:51 PM  Show Profile  Reply with Quote
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!

Whole Tomato Software
Go to Top of Page

jschroedl
Tomato Guru

USA
103 Posts

Posted - Mar 15 2017 :  08:02:55 AM  Show Profile  Reply with Quote
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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Mar 15 2017 :  10:33:05 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

jschroedl
Tomato Guru

USA
103 Posts

Posted - Mar 15 2017 :  10:41:59 AM  Show Profile  Reply with Quote
Great. I submitted a zip with our sln and various project files.
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Mar 15 2017 :  12:48:13 PM  Show Profile  Reply with Quote
Thanks, I got the project, and will be contacting you through email. (case=104545)

Whole Tomato Software
Go to Top of Page

jschroedl
Tomato Guru

USA
103 Posts

Posted - Mar 17 2017 :  10:28:42 AM  Show Profile  Reply with Quote
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!

Edited by - jschroedl on Mar 17 2017 10:30:12 AM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Mar 24 2017 :  10:19:32 PM  Show Profile  Reply with Quote
case=104545 is fixed in build 2212.
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