How to control where cppcheck stores analyzerinfo files? - cppcheck

Recently, newer versions of cppcheck (2.8.2) are create files ending with .analyzerinfo for every source file in my repository.
So example.c would have a file created called example.c.analyzerinfo.
Is there a way to control where these files are stored?
The --cppcheck-build-dir is set and populated with files but the analyzerinfo files are still created in my source directory.

It's a recent bug, as mentioned here. It hasn't yet been fixed since the offending commit.

Related

VS2015 Express & VS2017: Document cannot be opened: It has renamed, deleted or moved

Hey I know people have started forums already concerning this problem.
I'm trying to create a SFML project template in VS2015 Express (I've also tried it in VS2017). I've followed many guides and answers to this problem on here, MSDN forums and others.
No matter what I try, the project template cannot open up my source and header files from the original project I created the template from. "Document cannot be opened: It has renamed, deleted or moved."
I'm working with/on:
Win10 PC; 64-bit
VS Express 2015 for Windows Desktop; v. 14.0.25431.01 Update 3
VS 2017; v. 15.3.5 (rather use VSE 2015 though)
What I've tried:
- Opening the MyTemplate.vstemplate file in texteditor, adding true in TemplateData;
adding: filename.cpp or
filename.h, replacing the filename with the .cpp and .h filenames in the TemplateContent section
unchecked Automatically import template when exporting template
unzipping, adding source files, rezipping and placing zip file in Templates\Project Templates zipped and unzipped
adding new mentioned zip file above (with source files inc.) into My Exported Templates folder
haven't deleted Properties folder in MyTemplate.vstemplate bc I couldn't find a file there?
I've been at my desk for around 3 hours and have hit my first roadblock, I don't know what to do. Please assist, guys.
EDIT: Found the problem; although the original .cpp and .h files aren't being added into the exported template.
When I create a new project using my custom template, the source files (from the original project used to create the template) are not automatically added into the new project's files. So I have to manually copy the files from my original project to the new project's folder.
Any way to have the original source files added into the new project's files so I don't have to this manually every time?
I know this is pretty old but I'm going through the same thing and it was driving me crazy. So I figured out how to edit the project template to make it work.
I used Winrar, but I'm sure there's a bit simpler approach but here it goes:
I went to C:\Users\MyName\Documents\Visual Studio 2015\Templates\ProjectTemplates
and opened my SFML template with winrar. I then copied all of my .h and .cpp files from the original project into the template. I did this with another instance of winrar by dragging and dropping the files.
Then, I edited the MyTemplate.vstemplate file. I added a new "ProjectItem"Line by copying and pasting one of the ones already there. For example:
<ProjectItem ReplaceParameters="false" TargetFileName="ReadMe.txt">ReadMe.txt</ProjectItem>
This was an original line and I copied it and edited it to match one of the files I added. For example, I changed ReadMe.txt to SFML.cpp in a new line.
I did this for all of the new files, saved it and then it worked!
Let it be noted that I did not extract the template .zip at any point.

Could not load file or assembly 'Sitecore.Analytics' or one of its dependencies

I am facing one error while login into sitecore.
"Could not load file or assembly 'Sitecore.Analytics' or one of its dependencies"
Even if I exclude sitecore.analitics.config from incude folder. But still I am facing this issue.
You must have the Sitecore.Analytics.dll file in your /bin folder, even if you are not using DMS.
If you are missing the file completely then you should re-download the Sitecore files for your version from SDN and add the missing file to your application.
You can also try to exclude the Sitecore.Analytics.Robots.config as well
This error means your /bin/ does not contain Sitecore.Analytics.dll
I would also check to make sure there is nothing in your web.config file (or various include files) that is targeting a specific version of the Analytics.dll
Please exclude these files from app_config/include folder and then retry
Sitecore.Analytics.config
Sitecore.Analytics.ExcludeRobots.config
Sitecore.Analytics.RobotDetection.config

C++-Build: After editing a file in a project the build process takes a long time. How to find out which files/classes are responsible?

I have a very large VC++-Project which takes a long time to Rebuild after i edited a file. Maybe it's a central-class and so the following classes have to be rebuild, too. I'm using class-definitions and do include the header in the cpp-file, not .h-file in .h-file ;-)
Is there a way to find out which class/file is resposible? Are some useful tools to visualize the includes in a graph/dependencygraph? How do you get it?
Any file which directly or indirectly (through another include) #includes the file you changed will have to be rebuilt. Also if you have custom rules (say, the file you are editing is part of a custom rule that generates new source files), then any files changed by this rule and their dependencies will also have to be rebuilt.
MSDN Doc for visualizing the dependency graph:
http://msdn.microsoft.com/en-us/library/ff657798.aspx
ElectricAccelerator can help you answer this question by giving you an XML-annotated build log that includes information about which files are accessed during the compilation of each object, and the build time for each object. It has a Visual Studio plugin so it integrates right into your current environment.
Disclaimer: I'm the architect of ElectricAccelerator

Migration to SVN, confused about deleting old files

I have a StarTeam repo that I'm trying to migrate to SVN. Unfortunately the repo is HUGE, so I can't use any of the polarion scripts, etc. I'm resorting to checking out snapshots of each release in StarTeam and then manually adding/committing them to SVN.
However, I'm confused about what to do for old files. In StarTeam, we had to move deleted files to an "obsolete" folder since the purge command removed all copies of the file. I know that I don't need to do that in SVN, but how does SVN deal with files which have been deleted/are missing?
Say I have three files in the following structure:
trunk/
Src/
A.cpp
B.cpp
C.cpp
If from one release to another I deleted "C.cpp", do I just need to commit all of src for the deletion to be reflected in the SVN repo?
Likewise, if I deleteed "C.cpp" but added "D.cpp", I would need to call add on all of "src/" before committing. Would that cause any problems with detecting and deleting the missing files? There are too many of them to go through manually and delete every one individually.
As a separate question, is there a reason why it takes tortoiseSVN almost 3 hours to detect which files are changed before I can add/commit? All I see is the "Please wait..." message in the dialog box, and it takes FOREVER.
Thanks!
Any change you make to the repo needs a commit, so yes after doing svn delete you need to svn commit. Similarly when you add files, that's a change that needs to be committed. In both cases it's possible to undo the add and delete without commiting.
In terms of adding and removing files in one transaction, again that "just works", you'd effectively issue:
svn delete C.cpp
svn add D.cpp
svn commit
If you want to recover a deleted file, then you can just recover the file from an earlier revision of the svn repo, then recommit (see also What is the correct way to restore a deleted file from SVN?).
The main thing you must remember though when deleting files: you must delete it using subversion tools (i.e. from the command line as svn delete or using Delete within TortoiseSVN. Just deleting it using del, rm, or a file manager like windows explorer will have SVN see the file as "missing" and not "deleted", and a commit of the repo will not commit the delete; thus the next time you update your working copy, the missing files will be restored. Thus you use subversion to delete the file so subversion knows that you do actually want it deleted.
For your last question -- what version of SVN and how big is the repo (in terms of file-count). Essentially T-SVN has to walk the tree and check each file against the repo-version to see it it's changed. As of SVN 1.7, the working copy format changed with a lot of metadata being held in the database, and improvements to the storage of pristine copies (i.e., what the file looked like when it came out of svn) means that it's faster than it was. If you aren't using 1.7, then it's worth checking out. Also, if you have a large repo but only work in a small part of it then consider using sparse checkouts to reduce the size of your local working copy. See this answer to Checkout one file from Subversion for a brief overview or sparse checkouts.

File with .cpp,v extension

I 've a c++ code. but its with .cpp,v extension. I want to debug and compile the code. Can anyone please throw some light on that topic. I want to know what v indicates? & how to debug the code?
It's a file from CVS or some related version control system. The files ending with ",v" are not the actual source files, rather these are housekeeping files used by CVS.
You will need to go back to the CVS repository and get the .cpp and .h source file(s).