Configuring a CodeScene project
===============================

CodeScene has several configuration options. To get the most out of CodeScene, the tools needs a bit of
input from you around team and architectural structure. The steps that require manual configuration are:

1. *Resolve author aliases*: Git makes it easy for a developer to commit from multiple machines, often leading to the same
   physical person being recorded as multiple authors in Git.
2. *Tell CodeScene about Former Contributors*: One of CodeScene's most powerful analyses is code familiarity. To enable this
   analysis, you need to indicate which developers that have left the organisation (ie. former contributors).
3. *Define Architectural Components*: CodeScene performs architectural analyses. The architectual analyses are based on
   the subsystems and component boundaries that you provide.
4. *Define Development Teams*: In a larger organization, the most interesting level of the team level. That makes it possible
   to analyse team coordination, but also enables team-specific analysis dashboards.
5. *Exclude 3rd Party code and auto-generated content*: Many codebases contain 3rd party code copied into the same
   repositories as the application code (e.g. JavaScript assets, generated backend code).

In the next sections, we walk you through each one of these steps.

Resolve author aliases
----------------------

Git makes it easy for a developer to commit from multiple machines, often leading to the same
physical person being recorded as multiple authors in Git. Start by resolving these aliases as described in :ref:`dev-alias-mapping`.

.. figure:: cs-patterns-merge-authors.png
   :scale: 60%
   :alt: CodeScene auto-detects author aliases and helps you resolving them.
   :name: cs-patterns-merge-authors

   CodeScene auto-detects author aliases and helps you resolving them -- check your initial analysis for warnings.

Tell CodeScene about Former Contributors
----------------------------------------

One of CodeScene's most powerful analyses is code familiarity. To enable this analysis, you need to indicate which
developers that have left the organisation (ie. former contributors). You do this by checking the former contributor
box next to the relevant developers in :doc:`/configuration/developers-and-teams`.

Define Architectural Components
-------------------------------

CodeScene performs architectural analyses. The architectual analyses are based on
the subsystems and component boundaries that you provide.

The definitions are largely automated, but require your input: :doc:`/guides/architectural/architectural-analyses`.

.. figure:: cs-patterns-auto-generate-architectural-components.png
   :alt: Enable the architectural analyses to get hotspots, code health, costs, and trends on a system level.
   :name: cs-patterns-auto-generate-architectural-components

   Enable the architectural analyses to get hotspots, code health, costs, and trends on a system level.

Define Development Teams
------------------------

In a larger organization, the most interesting level of the team level. That makes it possible
to analyse team coordination, but also enables team-specific analysis dashboards. Tell CodeScene about your development
teams by mapping individuals to teams: :doc:`/configuration/developers-and-teams`.

Exclude 3rd party code
----------------------

Many codebases contain 3rd party code copied into the same repositories as the application code (e.g. JavaScript assets, generated backend code).
You want to exclude that content to avoid alerts or warnings on code that you  aren't directly responsible for as
defined in :ref:`Exclude-Specific-Files-and-Folders-from-an-Analysis`.