Run an Analysis¶
Creating a New Project¶
Your first step is to create and configure a project. You do that by clicking on the “New Project” button (see Fig. 6).
Once you click the “Create New Project” button you are prompted with six choices:
The default choice is to Specify Git Remotes, e.g. email@example.com:facebook/react.git. With this option, CodeScene clones your Git repositories and pulls the latest changes during each analysis. The other project creation options are more of a special case and to be used when needed.
Once you click “Continue”, you arrive at the “Project Details” page (see Fig. 8). There are a number of important configuration options in this step. The Configuration include advice on how you select an analysis period. When in doubt, specify the earliest possible starting date as indicated in the help text.
NOTE: It’s important that the Analysis Results file folder that you specify is writable for the Tomcat user; all analysis result content will be stored there.
Once you’ve created the project you’ll arrive at its configuration details. And yes, there’s a lot, really a lot, of configuration parameters. The good news are that you normally don’t have to change any of these parameters since they all have sensible defaults. However, you want to look at your Analysis Plan. Go to the “Analysis Plan” configuration as shown in Fig. 9 and specify a suitable interval, for example once every night.
From now on, CodeScene will run all analyses automatically according to your plan. However, you probably don’t want to wait for the next scheduled run to get results on your codebase. That’s why CodeScene supports a forced analysis as described in the next section.
Force an Analysis¶
CodeScene lets you run an analysis on demand. Just go to the dashboard and press the Run button as illustrated in Fig. 10.
Run a Retrospective¶
CodeScene also includes the option to run an analysis tailored to a Retrospective. This feature is located on the “History” tab of your analysis project as illustrated in Fig. 11.
For a detailed description of the use cases for Retrospectives, read the article The Happy Marriage of Retrospectives and Software Evolution.
Find your Way Around¶
We’ve worked to make CodeScene as easy as possible for you to use. Basically, you just need to remember three things:
Click the cogs button of your project (see Fig. 12) to access details, configuration, and to force analyses.
Click on the tile representing your project to inspect your analysis results.
Click on the “CODESCENE” logo in the top-left corner to return to the main screen, should you ever get lost.
Analyse Projects with Git Submodules¶
Submodules are a Git mechanism that allow you to include a complete Git repository as a subdirectory of another Git repository. CodeScene can analyse submodules-based projects too, but you need to enable that support when creating a project; by default, submodules are not included as they might reference third-party code that you don’t want in your analysis.
You enable the analysis of Git submodules when creating a new CodeScene project:
CodeScene’s behaviour for projects with submodules is:
Creation: Clone all included submodules automatically.
Continuous Analyses: Fetch the latest changes to all submodules automatically.
Webhooks: If you integrate with pull requests, then CodeScene sets up webhooks for the submodule repositories too.