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
Integration with CVS (Concurrent Versions System) |
|
Integration with IBM Rational ClearCase |
|
Integration with Serena Dimensions CM |
|
Integration with eASEE |
|
Integration with Fossil SCM |
|
Integration with Git |
|
Integration with PTC Windchill RV&S (formerly PTC Integrity, formerly MKS Integrity) |
|
Integration with Mercurial |
|
Integration with Serena PVCS Version Manager |
|
Integration with Perforce VCS |
|
Integration with Plastic SCM |
|
Integration with IBM Engineering Workflow Management (formerly IBM Rational Team Concert) |
|
Integration with Apache Subversion (SVN) |
|
Integration with Micro Focus StarTeam |
|
Integration with Perforce Surround SCM (formerly Seapine Surround SCM) |
|
Integration with Microsoft Team Foundation Server (TFS) |
|
Integration with Microsoft Visual SourceSafe (VSS) |
|
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] = {'.'}
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 =
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).None
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 =
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 unlessFalseskip_blameis 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
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.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/*'}
silence_stderr¶
silence_stderr : bool = False
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 =
NoneOptional 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 -lto map the display name back to login names.If the substrings
%1or$1occur 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
Association between version control account names and (dashboard) users.Type: dict[bauhaus.analysis.config.GlobPattern, str]
Default:
{ '*': '__lowercase__' }You can specify multiple comma-separated dashboard users for the same vcs account pattern. If multiple patterns match, the most specific patterns wins.