SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
PVS-Studio has learned to watch over
    Studio
your programming
Author: Andrey Karpov

Date: 24.06.2011

PVS-Studio now has an operation mode that will help you to find errors and misprints as soon as
                      n
possible. The analyzer launches right after the files have been compiled and "blushes with shame" for
                                                                              blushes
your code if something goes wrong. The feature is currently available only for Visual Studio 2010 users
                                                                                                  users.




I wrote many times that the sooner an error is detected, the lower is the price of fixing it. Well I'm
                                                                                              Well,
certainly not the first one to say it and authors of numerous books and articles have been repeating this
over again. Take S. McConnell for example. So I will not repeat myself.
                     McConnell,

The previous versions of the PVS
                              PVS-Studio analyzer had to be run manually or during night builds. It is
surely fine when you can look through a log at morning and fix some error found But it's not ideal. It
                                                                             found.
doesn't prevent you from making a couple of small mistakes during the day and spending 10 minutes to
find each of them. PVS-Studio will hardly help you in such a case: it's not convenient to run it only for
                         Studio                                       s
changed files and it's too long to run it for the whole project
                     s                                  project.

Fortunately, we are programmers ourselves and we are responsive to needs of our keyboard colleagues.
A new mode of incremental analysis has appeared in PVS-Studio 4.30. Verification is now almost
combined with the compilation step: the analyzer checks those files which are being compiled by
pressing the F7 key that everyone loves so much. This mode can be enabled not just simply but very
simply: you just have to check the box opposite to the "Incremental Analysis After Build item in the
                                                        Incremental                Build"
PVS-Studio menu:




Now let's see how it works by an example. Suppose I enjoyed the process of programming very much
and was in a hurry, so I made a mistake in an array index:
                                              array's
The result of this expression is always 'false'. But I do not take notice of it. I'm writing the code further
and feeling happy. Then, satisfied with the work I've done, I press F7 and the modified file compiles
successfully and VS2010 does not generate any warnings. I proceed to edit the next code fragment.

But when compilation is complete, the PVS-Studio analyzer launches quietly in background and checks
the modified files. It runs in background intentionally in order not to disturb the programmer. Static
analysis takes more time to perform than compilation, so it's no good making the programmer sigh
heavily watching the progress dialog. If everything is written correctly (both on your side and our side ;-)
), the programmer will never notice that PVS-Studio is working.

But we do have an error. Some time later the analyzer will signal a suspicious code fragment! It will get
red and the programmer will but open the necessary tab to see the details:




Indeed, you may read in the message that the condition is always false:
As a result, the error will get fixed almost right after being written.

Please try the new mode of PVS-Studio. As usual, you may download the trial version here. If VS2010
gets a bit slow after installation, reduce its appetite. The analyzer by default uses all the available
processor cores. So, you may specify in the settings how many cores can be used.



I'm anticipating some questions right now. That's why I've prepared a small FAQ at the end.



1) Why does the new mode have support only in VS2010?

Only Visual Studio 2010 has the API that allows you to determine which files have been modified and
what files are dependent on them. In other words, a mechanism has appeared that allows you to choose
the files to be checked. You may read about it in detail here [1].

If people like the new mode, we will think over as how to implement it for Visual Studio 2005/2008
users too. However, I want to note that it's much easier to switch to Visual Studio 2010 than it seems.
You may select the old compiler but use capabilities of the new environment. This is achieved through
Platform Toolset [2].



2) Why not implement check on the fly straight away and underline errors immediately like it is done in
IntelliSense?

First, we do not have such a close integration with Visual Studio. To get it, we must be better friends
with Microsoft.

Second, it won't do anyway. Static analysis is quite complicated and an analyzer must collect much
information on a rather large code fragment to detect some errors. Since the code is being edited, it will
be almost impossible to parse it. I think every programmer has seen how a C/C++ compiler goes mad
about one unnecessary parenthesis or incorrect template. C/C++ is not the right language to be analyzed
absolutely on the fly.



3) What to do if I cannot tell green from red?

A good remark. Well, in the next version there will be also a text written on the tab along with the color
change.



4) Why doesn't something work here or there?

This is a new feature and some errors are highly probable. We will appreciate if you tell us about
drawbacks you've noticed and your wishes. The Feedback page.



5) When I'm performing Rebuild, will the analyzer check the whole project then?

No. It's meaningless and too long. The analyzer ignores commands of solution and project rebuilds. If
you want to check a solution or project, you still may use the corresponding commands in the analyzer.



References

    1. Paul Eremeev. Using PVS-Studio analyzer together with Microsoft Visual Studio 2010
       incremental assembly. http://www.viva64.com/en/b/0101/

    2. MSDN. How to: Modify the Target Framework and Platform Toolset.
       http://www.viva64.com/go.php?url=689

Weitere ähnliche Inhalte

Andere mochten auch

An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timingPVS-Studio
 
Comparison of analyzers' diagnostic possibilities at checking 64-bit code
Comparison of analyzers' diagnostic possibilities at checking 64-bit codeComparison of analyzers' diagnostic possibilities at checking 64-bit code
Comparison of analyzers' diagnostic possibilities at checking 64-bit codePVS-Studio
 
Brief description of the VivaCore code analysis library
Brief description of the VivaCore code analysis libraryBrief description of the VivaCore code analysis library
Brief description of the VivaCore code analysis libraryPVS-Studio
 
The essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryThe essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryPVS-Studio
 
20 issues of porting C++ code on the 64-bit platform
20 issues of porting C++ code on the 64-bit platform20 issues of porting C++ code on the 64-bit platform
20 issues of porting C++ code on the 64-bit platformPVS-Studio
 
32 OpenMP Traps For C++ Developers
32 OpenMP Traps For C++ Developers32 OpenMP Traps For C++ Developers
32 OpenMP Traps For C++ DevelopersPVS-Studio
 
Safety of 64-bit code
Safety of 64-bit codeSafety of 64-bit code
Safety of 64-bit codePVS-Studio
 
Lesson 1. What 64-bit systems are
Lesson 1. What 64-bit systems areLesson 1. What 64-bit systems are
Lesson 1. What 64-bit systems arePVS-Studio
 
Lesson 14. Pattern 6. Changing an array's type
Lesson 14. Pattern 6. Changing an array's typeLesson 14. Pattern 6. Changing an array's type
Lesson 14. Pattern 6. Changing an array's typePVS-Studio
 
The forgotten problems of 64-bit programs development
The forgotten problems of 64-bit programs developmentThe forgotten problems of 64-bit programs development
The forgotten problems of 64-bit programs developmentPVS-Studio
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryPVS-Studio
 
Development of resource-intensive applications in Visual C++
Development of resource-intensive applications in Visual C++Development of resource-intensive applications in Visual C++
Development of resource-intensive applications in Visual C++PVS-Studio
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzerPVS-Studio
 
Explanations to the article on Copy-Paste
Explanations to the article on Copy-PasteExplanations to the article on Copy-Paste
Explanations to the article on Copy-PastePVS-Studio
 
Lesson 10. Pattern 2. Functions with variable number of arguments
Lesson 10. Pattern 2. Functions with variable number of argumentsLesson 10. Pattern 2. Functions with variable number of arguments
Lesson 10. Pattern 2. Functions with variable number of argumentsPVS-Studio
 
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...PVS-Studio
 
Static code analysis and the new language standard C++0x
Static code analysis and the new language standard C++0xStatic code analysis and the new language standard C++0x
Static code analysis and the new language standard C++0xPVS-Studio
 

Andere mochten auch (17)

An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timing
 
Comparison of analyzers' diagnostic possibilities at checking 64-bit code
Comparison of analyzers' diagnostic possibilities at checking 64-bit codeComparison of analyzers' diagnostic possibilities at checking 64-bit code
Comparison of analyzers' diagnostic possibilities at checking 64-bit code
 
Brief description of the VivaCore code analysis library
Brief description of the VivaCore code analysis libraryBrief description of the VivaCore code analysis library
Brief description of the VivaCore code analysis library
 
The essence of the VivaCore code analysis library
The essence of the VivaCore code analysis libraryThe essence of the VivaCore code analysis library
The essence of the VivaCore code analysis library
 
20 issues of porting C++ code on the 64-bit platform
20 issues of porting C++ code on the 64-bit platform20 issues of porting C++ code on the 64-bit platform
20 issues of porting C++ code on the 64-bit platform
 
32 OpenMP Traps For C++ Developers
32 OpenMP Traps For C++ Developers32 OpenMP Traps For C++ Developers
32 OpenMP Traps For C++ Developers
 
Safety of 64-bit code
Safety of 64-bit codeSafety of 64-bit code
Safety of 64-bit code
 
Lesson 1. What 64-bit systems are
Lesson 1. What 64-bit systems areLesson 1. What 64-bit systems are
Lesson 1. What 64-bit systems are
 
Lesson 14. Pattern 6. Changing an array's type
Lesson 14. Pattern 6. Changing an array's typeLesson 14. Pattern 6. Changing an array's type
Lesson 14. Pattern 6. Changing an array's type
 
The forgotten problems of 64-bit programs development
The forgotten problems of 64-bit programs developmentThe forgotten problems of 64-bit programs development
The forgotten problems of 64-bit programs development
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memory
 
Development of resource-intensive applications in Visual C++
Development of resource-intensive applications in Visual C++Development of resource-intensive applications in Visual C++
Development of resource-intensive applications in Visual C++
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzer
 
Explanations to the article on Copy-Paste
Explanations to the article on Copy-PasteExplanations to the article on Copy-Paste
Explanations to the article on Copy-Paste
 
Lesson 10. Pattern 2. Functions with variable number of arguments
Lesson 10. Pattern 2. Functions with variable number of argumentsLesson 10. Pattern 2. Functions with variable number of arguments
Lesson 10. Pattern 2. Functions with variable number of arguments
 
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defe...
 
Static code analysis and the new language standard C++0x
Static code analysis and the new language standard C++0xStatic code analysis and the new language standard C++0x
Static code analysis and the new language standard C++0x
 

Kürzlich hochgeladen

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

PVS-Studio has learned to watch over your programming

  • 1. PVS-Studio has learned to watch over Studio your programming Author: Andrey Karpov Date: 24.06.2011 PVS-Studio now has an operation mode that will help you to find errors and misprints as soon as n possible. The analyzer launches right after the files have been compiled and "blushes with shame" for blushes your code if something goes wrong. The feature is currently available only for Visual Studio 2010 users users. I wrote many times that the sooner an error is detected, the lower is the price of fixing it. Well I'm Well, certainly not the first one to say it and authors of numerous books and articles have been repeating this over again. Take S. McConnell for example. So I will not repeat myself. McConnell, The previous versions of the PVS PVS-Studio analyzer had to be run manually or during night builds. It is surely fine when you can look through a log at morning and fix some error found But it's not ideal. It found. doesn't prevent you from making a couple of small mistakes during the day and spending 10 minutes to find each of them. PVS-Studio will hardly help you in such a case: it's not convenient to run it only for Studio s changed files and it's too long to run it for the whole project s project. Fortunately, we are programmers ourselves and we are responsive to needs of our keyboard colleagues. A new mode of incremental analysis has appeared in PVS-Studio 4.30. Verification is now almost combined with the compilation step: the analyzer checks those files which are being compiled by pressing the F7 key that everyone loves so much. This mode can be enabled not just simply but very simply: you just have to check the box opposite to the "Incremental Analysis After Build item in the Incremental Build" PVS-Studio menu: Now let's see how it works by an example. Suppose I enjoyed the process of programming very much and was in a hurry, so I made a mistake in an array index: array's
  • 2. The result of this expression is always 'false'. But I do not take notice of it. I'm writing the code further and feeling happy. Then, satisfied with the work I've done, I press F7 and the modified file compiles successfully and VS2010 does not generate any warnings. I proceed to edit the next code fragment. But when compilation is complete, the PVS-Studio analyzer launches quietly in background and checks the modified files. It runs in background intentionally in order not to disturb the programmer. Static analysis takes more time to perform than compilation, so it's no good making the programmer sigh heavily watching the progress dialog. If everything is written correctly (both on your side and our side ;-) ), the programmer will never notice that PVS-Studio is working. But we do have an error. Some time later the analyzer will signal a suspicious code fragment! It will get red and the programmer will but open the necessary tab to see the details: Indeed, you may read in the message that the condition is always false:
  • 3. As a result, the error will get fixed almost right after being written. Please try the new mode of PVS-Studio. As usual, you may download the trial version here. If VS2010 gets a bit slow after installation, reduce its appetite. The analyzer by default uses all the available processor cores. So, you may specify in the settings how many cores can be used. I'm anticipating some questions right now. That's why I've prepared a small FAQ at the end. 1) Why does the new mode have support only in VS2010? Only Visual Studio 2010 has the API that allows you to determine which files have been modified and what files are dependent on them. In other words, a mechanism has appeared that allows you to choose the files to be checked. You may read about it in detail here [1]. If people like the new mode, we will think over as how to implement it for Visual Studio 2005/2008 users too. However, I want to note that it's much easier to switch to Visual Studio 2010 than it seems. You may select the old compiler but use capabilities of the new environment. This is achieved through Platform Toolset [2]. 2) Why not implement check on the fly straight away and underline errors immediately like it is done in IntelliSense? First, we do not have such a close integration with Visual Studio. To get it, we must be better friends with Microsoft. Second, it won't do anyway. Static analysis is quite complicated and an analyzer must collect much information on a rather large code fragment to detect some errors. Since the code is being edited, it will be almost impossible to parse it. I think every programmer has seen how a C/C++ compiler goes mad
  • 4. about one unnecessary parenthesis or incorrect template. C/C++ is not the right language to be analyzed absolutely on the fly. 3) What to do if I cannot tell green from red? A good remark. Well, in the next version there will be also a text written on the tab along with the color change. 4) Why doesn't something work here or there? This is a new feature and some errors are highly probable. We will appreciate if you tell us about drawbacks you've noticed and your wishes. The Feedback page. 5) When I'm performing Rebuild, will the analyzer check the whole project then? No. It's meaningless and too long. The analyzer ignores commands of solution and project rebuilds. If you want to check a solution or project, you still may use the corresponding commands in the analyzer. References 1. Paul Eremeev. Using PVS-Studio analyzer together with Microsoft Visual Studio 2010 incremental assembly. http://www.viva64.com/en/b/0101/ 2. MSDN. How to: Modify the Target Framework and Platform Toolset. http://www.viva64.com/go.php?url=689