Code Health

A performance optimization that makes better use of multiple CPU cores. When enabling it, check your JVM settings to ensure you have at least -Xss2m specified as stack size to handle large hotspots.

Performance Implications. Enabling the Full Code Health Scan will increase your total analysis time. CodeScene uses a cache to optimize the calculations, but the first analysis will be slower; with this option enabled, the analysis time increases near linearly with the number of files in your repositories. Sub-sequent analyses will be quicker, thanks to the cache.

Enable this option to scan the health of all code in the project.
This option sets the threshold for Code Health alerts in notifications, goals and pull requests. By default, all declines below a perfect score of 10 will result in alerts. This also means that new files with an initial Code Health score below 10 will trigger the quality gates. Lowering this threshold will result in fewer warnings and quality gate failures.

Custom Code Health

CodeScene lets you override specific code health rules via a config file in each Git repository. Download this template to inspect and tweak the rules. The template contains further instructions on how to store and enable the rules. Commit the template as .codescene/code-health-rules.json inside your Git repos. Read more in the documention.
Check this box to disable all overriden rules and run with CodeScene's calibrated weights. This might be a useful exercise to see if there are any overriden issues of interest.
Specify the name of one of the repositories in the project that contains global rules, e.g. codescene-rules-repo. This way you can specify a set of global rules in one Git repository and have those rules applied across all Git repositories in your project.

Note: The delta analysis uses the global rules that were present during the last full analysis. This means that when updating global rules, a full analysis has to be performed before they apply to delta analyses in all project repositories.

Defect Mining Pattern

Specify a regular expression that identifies bug fix commits to get statistics on the defect distribution across your hotspots.

A regular expression that matches bug fixes in the commit messages. For example, CR{2,}-\d+ matches commits like CR-782 and CR-231, while the expression [Bb]ug|[Ff]ix is a heuristic to match commits containing bug fixes.

Code Comment Patterns

{% for c in item.code-comments-biomarker-config %}
{% endfor %}
Specify one or more regular expressions that CodeScene will match in the code comments of hotspots. The data will be presented in the Virtual Code Review of each hotspot. Use the regex comment syntax (?#comment) to put a name on the pattern. For example: TODO(?#Detect TODOs) match the literal TODO in comments, and the virtual code reviewer will include it under the Detect TODOs: heading. See the documention for examples.

X-Ray

When checked, all historic revisions of a file are included in the X-Ray of a Hotspot. This may be quite time consuming, which is why CodeScene limits the X-Ray history to the last 200 revisions unless you enable this option.
{% if feature-flags.configurable-xray-change-coupling-threshold %}
Minimum coupling degree info
{% else %} {% endif %}

Early Warning: Rising Hotspots

Specifies how far back in time we will look for a rising spot. With more development activity, choose a shorter time span.

Early Warning: Complexity Trends

Ignore historic artifacts by only generating early warnings for code that has been modified during the past months as configured here.

Code Age

When checked, the code age is calculated relative to the date of the last commit, otherwise CodeScene uses the current analysis date.

Renamed and Moved Content

CodeScene detects moved/renamed source code files and folders. However, that detection increases the analysis time. This number specifies the maximum number of files in a commit before we give up on rename detection.