6.1.4. VCSIntegration

Version Control System Integration

This rulegroup is used to configure the (one or possibly more) version control system (VCS) that is/are used to manage the source code of the project.

Integration with the VCS is required in order to track movement of issues in source code due to changed lines (diff functionality). Also, if the VCS supports it, issues can be assigned to responsible developers (blame/annotate functionality).

If you require multiple VCS instances for your project, you may copy the required VCS integration rule and then set the option rootpath for each instance individually to the relative path inside your project directory.

In case of source code that is generated during the build and still relevant for analysis, you can enable SpecialVCS/Shadow in order to do automatic code versioning of generated code.

Nested Rules

CVS

Integration with CVS (Concurrent Versions System)

ClearCase

Integration with IBM Rational ClearCase

Dimensions

Integration with Serena Dimensions CM

EASEE

Integration with eASEE

Fossil

Integration with Fossil SCM

Git

Integration with Git

Integrity

Integration with PTC Windchill RV&S (formerly PTC Integrity, formerly MKS Integrity)

Mercurial

Integration with Mercurial

PVCS

Integration with Serena PVCS Version Manager

Perforce

Integration with Perforce VCS

Plastic

Integration with Plastic SCM

RTC

Integration with IBM Engineering Workflow Management (formerly IBM Rational Team Concert)

SVN

Integration with Apache Subversion (SVN)

StarTeam

Integration with Micro Focus StarTeam

Surround

Integration with Perforce Surround SCM (formerly Seapine Surround SCM)

TFS

Integration with Microsoft Team Foundation Server (TFS)

VSS

Integration with Microsoft Visual SourceSafe (VSS)

SpecialVCS

Pseudo VCS plugins

6.1.4.19. Options

  • Setting an option for this rule means setting the default for all nested rules.

  • The following places define options that affect this rule: Project-GlobalOptions

directory_whitelist

directory_whitelist : set[bauhaus.analysis.config.ProjectRelativePath] = {'.'}

Set of relative directories below /Project/directory, which are to be included in the project database. This is useful as a whitelist to select only certain directories of interest for large projects, which can lead to analysis speedup.

This is currently only implemented for ClearCase, CVS, and in local_mode.

 

file_owner

Issues are assigned to owners automatically based on VCS information. The options in this rule can be used to add other issue owners so that these owners are always informed about issue changes in their owned files.
 

file_owner.file_owner_callback : bauhaus.analysis.config.LayerRelativePath | None = None

Optional script being called with a working copy relative filename. The answer may be a single line (in which case all lines of the file are treated as belonging to this author) or multiple lines (in which case each line is being treated as the author of the respective line of the source file).
 

file_owner.file_owners : dict[bauhaus.analysis.config.FileGlobPattern, str] = {}

Globbing patterns for the association between files/directories and (dashboard) usernames.

You can specify multiple comma-separated dashboard users for the same glob pattern.

 

file_owner.file_owners_force_update : bool = False

Force an issue ownership update even if the file of the issue has not changed since last revision (will cause a VCS blame to be performed unless skip_blame is set in the VCS configuration). This can be useful if you changed the file_owners globbing map but the files have not changed.
 

ignore_globbings

ignore_globbings

Type: set[bauhaus.analysis.config.FileGlobPattern]

Default: {'*.a', '*.ali', '*.bin', '*.bmp', '*.bz2', '*.class', '*.d', '*.db', '*.db.*.bak', '*.db.bak', '*.dll', '*.doc', '*.docx', '*.ear', '*.elf', '*.exe', '*.fossil', '*.gif', '*.gz', '*.hex', '*.ico', '*.ir', '*.iso', '*.jar', '*.jpeg', '*.jpg', '*.lib', '*.lock', '*.mdb', '*.o', '*.obj', '*.odf', '*.opendb', '*.out', '*.pch', '*.pchi', '*.pchi.map', '*.pdf', '*.png', '*.ppt', '*.pptx', '*.ps', '*.pyc', '*.pyo', '*.rfg', '*.so', '*.so.*', '*.tar', '*.tgz', '*.tif', '*.tiff', '*.txz', '*.uu', '*.vsd', '*.war', '*.xls', '*.xlsx', '*.xz', '*.zip', '*/.git/*', '*/.gradle/*', '*/.hg/*', '*/.idea/*', '*/.svn/*', '*/.venv/*', '*/.vs/*', '*/.vscode/*', '*/CVS/*', '*/lost+found/*'}

File globbings for files that should not get inserted into the project database (and thus are not visible within the dashboard). Also those files are not hashed during analysis, which can speed up analysis time.
 

silence_stderr

silence_stderr : bool = False

If set to true, stderr output of the called VCS tools is not visible in the log output.
 

vcs_mapping

Issues are assigned to owners automatically based on VCS information. The options in this rule can be used to associate these version control account names with dashboard users.
 

vcs_mapping.vcs_account_callback : bauhaus.analysis.config.LayerRelativePath | None = None

Optional script being called with a name as reported by the VCS as argument.

The first line of the output to stdout is treated as the name to map the VCS user to. If the answer is empty, __identity__ is assumed.

If vcs_account_callback is set, then vcs_accounts mapping is ignored.

In a Windows domain, and if your VCS returns the display name instead of your login name, you could configure dsquery * forestroot -filter "(&(objectCategory=Person)(displayName=%1))" -attr sAMAccountName -l to map the display name back to login names.

If the substrings %1 or $1 occur in the configured value, their occurrences are replaced with the verbatim vcsaccount name, otherwise the (possibly quoted) vcsaccount name is appended at the end.

 

vcs_mapping.vcs_accounts

Type: dict[bauhaus.analysis.config.GlobPattern, str]

Default:

{
   '*': '__lowercase__'
}
Association between version control account names and (dashboard) users.

You can specify multiple comma-separated dashboard users for the same vcs account pattern. If multiple patterns match, the most specific patterns wins.