Posts

Showing posts with the label Static Analysis

Static Analysis from IDE to CI with IntelliJ

Image
Static program analysis  is the  analysis of computer software  that is performed without actually executing programs (analysis performed on executing programs is known as  dynamic analysis ). [1]  In most cases the analysis is performed on some version of the  source code , and in the other cases, some form of the  object code . [2]   Static analysis provides a low cost way of automating code review of certain types of source code errors and standards.  Static code analysis, automated tests and code coverage are staples of the Continuous Integration process replacing manual effort with automation. Full featured IDEs implement their own integrated static analysis and test measurement tools. IntelliJ comes with a comprehensive set of integrated static analysis tools and rules.  It can run the rules in an incremental fashion updating results as code is edited.  Rule violations are immediately reflected in the user interface. CI...

Microsoft Code Analysis results differ based on Configuration

Image
Background Code Analysis (CA) is a very useful Visual Studio feature that applies good practice type static code analysis to your code base.  You can run CA manually at any time or configure it to run automatically on each build. Automatic execution can be configured per configuration per project. This means you can enable automatic CA on Release builds while ignoring it during builds in Debug mode.  Some teams do this to speed up the debug compilation cycle.  I'm not sure what in CA makes it so slow that you can't run it all the time :-( You can view which CA rules apply for any configuration or CPU type via the Solution Properties window: You can set the automatic execution of CA on a per project basis in the Code Analysis pane of the Project Properties: The method of Code Analysis  menu item and the position of the results varies by Visual Studio Version. The menu item that executes CA is located on the Build  menu in VS2013. Unexpected Beh...