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

JFD
New Member

Belgium
7 Posts

Posted - Jun 30 2020 :  03:46:41 AM  Show Profile  Reply with Quote
Hello,
There is a long time I'm using visual assist and I would like to use the new functionality "Code Inspection".
When I try to inspect my code, I have no results and I can see in REsult window the message "Parsing skipped ...".
I'm under VS2010, my code is standard C++ (no /clr, ...)
Do you habve an idea of the reason of this "not parsed" file?

JF

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jun 30 2020 :  05:27:58 AM  Show Profile  Reply with Quote
What file extensions are you seeing this in?

What happens if you create a new, default C++ solution? I have just created a new, default C++ Win32 console application, and added the following function to the main cpp file:

// redundant parameter
static void testRedundantChecks(void)
{
	for(int nScan = 1; nScan < 10; ++nScan)
	{
		continue;  // redundant continue
	}

	return; // redundant return
}

code inspection is picking up 3 issues in this function, as listed by the comments. Do you get the same results on your system?

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

JFD
New Member

Belgium
7 Posts

Posted - Jun 30 2020 :  05:46:22 AM  Show Profile  Reply with Quote
it works in new project, ... , I have advice in code inspection result.
It s just in my actual project (a big one 600000 code line) that I have parsing skipped but I don't know why and I don't see how to "force" a parsing

Edited by - JFD on Jun 30 2020 06:39:16 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jun 30 2020 :  11:26:05 AM  Show Profile  Reply with Quote
There is no force parse button, the parsing should be happening automatically.

What directory is your main solution located in?

If you go to:

VA Options -> C/C++ Directories

and look at the list of directories, does this directory list overlap with the directories your solution sits in? If VA thinks that your project is a stable system library then it won't attempt to scan for Code Inspection.

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

JFD
New Member

Belgium
7 Posts

Posted - Jul 01 2020 :  01:16:52 AM  Show Profile  Reply with Quote
The directory of the cpp file is not directly in the list, but well his parent (in mode project defined).
but the folder of the parent is not in VC++ Directories of the project in VS.
I tired to change the platform to custom (and restart VS) but I still have the problem : Parsing Skipped

Go to Top of Page

JFD
New Member

Belgium
7 Posts

Posted - Jul 01 2020 :  01:20:52 AM  Show Profile  Reply with Quote
I found the solution, the parent folder was in "include Directories", I removed from this list and my file is parsed.
Thanks for help
Go to Top of Page

JFD
New Member

Belgium
7 Posts

Posted - Jul 01 2020 :  01:52:00 AM  Show Profile  Reply with Quote
SO now I have an other problem.
In mmy solution I have different project in different folder.
C:\Pgm\FD1\Project1
C:\Pgm\FD2\Project2
I added in the include dir (from VS) the dir "c:\Pgm", so I'm able to do include "FD2/Project"
If I do so, I have the message "Parsing Skipped" in project FD1, because FD1 is in Pgm folder too.
I can't use ..\FD2, because it s a very big project so I must use the father in include dir.
Do you know a solution to use the parent folder in include but have the parse too? (I tried custom withjout any dir but it doesn't work.)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 01 2020 :  04:40:19 AM  Show Profile  Reply with Quote
How have you set these include directories?

In the Visual Studio 2010 Project Properties you can set include directories via either:

Project properties -> C/C++ -> General -> Additional Include Directories

which is for general include directories, or

Project properties -> VC++ Directories -> Include Directories

directories listed here will be treated by VA as stable 3rd party library code, so probably not parsed by Code Inspection either.

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

JFD
New Member

Belgium
7 Posts

Posted - Jul 01 2020 :  05:11:14 AM  Show Profile  Reply with Quote
thanks for the information, it works
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 01 2020 :  06:06:35 AM  Show Profile  Reply with Quote
The include directory settings in Visual Studio can be a little confusing, until you know that the include paths are treated slightly differently. I am glad this is now working well for you.

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

mintonla
New Member

USA
6 Posts

Posted - Jan 21 2022 :  10:26:53 AM  Show Profile  Reply with Quote
Piggy-backing on this thread since same issue, and I am not sure if what I am seeing is expected behavior. Running 10.92440.0, VS2019.
I'm trying to clean up headers in our public SDK folder. So a project's 'C/C++ properties, Additional Include Directories' includes the root folder of the headers I am cleaning. It is not specified in the VC++ Directories.
If a SDK header file is listed in the project's file list, then I can parse the file. If not, I can't parse the file (get 'Parsing skipped' message). This is true for both automatic and manual reparsing.
It seems like, especially for manual reparsing, that parsing should occur in this case. Having to move the header files into the project definition just to parse them will be a pretty major pain point. We have more than 1000 header files in the public sdk, and more in the internal private sdk folder.
Thanks, Larry
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jan 24 2022 :  09:55:28 AM  Show Profile  Reply with Quote
Code Inspection is designed not to parse stable include / library header files, since you are not expected to be editing these.

Have you considered opening an IDE instance, not opening your main solution, and instead using Open Folder for the root folder of the SDK you want VA to help you with?

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

mintonla
New Member

USA
6 Posts

Posted - Jan 24 2022 :  5:06:39 PM  Show Profile  Reply with Quote
Yes, I can work around this. Just saying that your definition of 'stable include / library header files' may not always reflect user's definition. Particularly with an explicit manual reparse, if I'm saying to do it it means I want to do it.
And until I found this thread, I had no idea why some headers would parse and others wouldn't. It just so happened that the ones that would just happened to be listed in the .vcxproj file. (20 year old proj files tend to be a bit inconsistent [g].) Confusion reigned....

And if I am creating a new header file in my public sdk folder, I most definitely want Code Inspection to be functional. For some of the issues (like adding 'override' keyword), that's one of the primary places the issue will occur.

Larry

Edited by - mintonla on Jan 24 2022 5:09:45 PM
Go to Top of Page

JFD
New Member

Belgium
7 Posts

Posted - Jan 25 2022 :  02:15:44 AM  Show Profile  Reply with Quote
Yes the definition of stable include was not the same for us too, as exemple, we have a library (dll) with some tools (our toolbox) to work on date, string, ....) that we use in every project. Ok it s stable but we must often add new tools, rewrite, ... so it s not so stable but it s in include directories.
For me it s better to have the possibility to include/Exclude folder for the scan and not do it totally automatically.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jan 27 2022 :  11:01:48 AM  Show Profile  Reply with Quote
I have set up a test case, to get a better feel for what is going on here, and so far I am not able to reproduce the problem.

Starting with the folder:

C:\src_2019\code_inspect_library
I have:

C:\src_2019\code_inspect_library\cpp_console_code_inspect_library\cpp_console_code_inspect_library.sln

which contains:

C:\src_2019\code_inspect_library\cpp_console_code_inspect_library\cpp_console_code_inspect_library\cpp_console_code_inspect_library.vcxproj

and a single main cpp file. Open the solution, and go into project properties, and I have set:

Project properties -> C/C++ -> General -> Additional Include Directories = ..\..\local_sdk_library;

which points to the folder, and file:

C:\src_2019\code_inspect_library\local_sdk_library\library_one.h

this library header file is not part of the solution. But it is visible and can be included via:

#include "library_one.h"

from a cpp file inside the solution. Alt-G takes me to this library header file, and Code Inspection is active and works normally in this file.

Now if you are talking about files inside directories that are listed in:

VA Options -> C/C++ Directories

then these are not parsed by Code Inspection, by design. We are expecting to find Windows SDK's, 3rd party libraries like Boost, and similar here. Also, unless you manually trigger a full VA symbol database rebuild, VA doesn't check these files for changes, since they are defined as "stable", and thus not prone to changing.

If I understand correct you have "stable" library's that are not actually stable. Which brings up a separate point, that VA probably won't work as well as normal when editing these files, since we are not expecting you to be editing them.

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

mintonla
New Member

USA
6 Posts

Posted - Jan 27 2022 :  12:42:23 PM  Show Profile  Reply with Quote
In the project you have for case 147740, remove windowstream.h from the list of files specified in the project and try to parse windowstream.h, you will get a 'Parsing skipped'.
But interestingly, if you parse the charstream.h or value.h that it includes, those do parse.

Larry
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 07 2022 :  1:22:52 PM  Show Profile  Reply with Quote
Sorry it has taken a while, but I have produced a "minimum" example. This bug requires one of the property sheet files, one #include line in the pch.h file and the copyright character.

I am left guessing that VA ends up thinking this is sort of a library header file, and that this combined with the copyright character is triggering the bug. But this is just how it looks from the simplified test case. Definitely a very "fragile" bug, things have to be just so to trigger it.

case=147806

zen is the art of being at one with the two'ness
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