Every revision control or source code management system uses branching. Branching refers to the duplication of files under version control so that two (or more) copies of those files may develop at different times or in different ways. Okay, we all know this. With branching, you get a lot of duplicated code. In some...

Every revision control or source code management system uses branching. Branching refers to the duplication of files under version control so that two (or more) copies of those files may develop at different times or in different ways. Okay, we all know this. With branching, you get a lot of duplicated code. In some branched projects, the majority of the code is the same.

So how does this impact your source code analysis or static analysis strategy? Well, it is a big problem. What if you spend your time analyzing a defect and come to the conclusion that it is something you want to ignore? Any good source code analysis tool will allow you to suppress that issue, while continuing to track the suppressed issue with each successive build, even though the line numbers may change. Great, but don’t forget all your other branches. That defect you just marked as ignore may exist in any number of your code branches. Again no problem, good source code analysis tools have the capability to automatically transfer any status changes or comments you made to defects to all your code branches.

But what about visibility of where all the defects exist before you make any changes. This is crucial to know if you want to fix the defect across all related projects and not just the one project you happen to be looking at. The image below gives you the visibility across branched projects that you need:

Not only do I get the details of that particular defect, but now I can see other branches where the defect occurs. From a project management perspective, keeping track of all defects within all projects or product lines is difficult to do, but this feature makes that part of your life that much easier. Can your source code analysis tool do that?

About the Author:
Alen Zukich

Hello, I'm Klocwork's Director of Product Management responsible for the company's product direction. I’m an Electrical Engineering graduate and CSPO. I’ve been with Klocwork for over a decade now including the time before we spun out. My passion is in the development tools space, so expect content related to software development.