LGTM Enterprise 1.22.1

Exploring projects

Project repositories are the primary source of data for LGTM Enterprise. The detailed information generated by analyzing each repository is shown on the project page.

Project controls

The project page has badges and grades, as well as a number of tabs, under the project name:

Project controls

Project badges

The badge section underneath the project name contains:

  • Language badges—these show the languages that LGTM identified in the project, and currently analyzes. Click on a language badge to open the Build logs page, which displays the status of the most recent LGTM analysis for each language where it has been attempted. For more information on the information displayed in logs, refer to Using the log viewer.
  • A project badge—it displays the overall code quality grade for the project. For more information on project grading, see Project scoring and grading.

With the mouse, hover over the overall grade to show the grade for each language:

Overall code quality grade dropdown list

  • The individual code quality grades are for the latest successful build for that language. In the example above, LGTM assigned a code quality grade of A to the last successful builds for the C/C++, Java, JavaScript and Python languages.
    • If you click on the project grade for a specific language, LGTM opens the project comparison page for that project and language.
    • There is no grade for C# because project scoring and grading isn't available for this language.
    • Also, there won't be a language badge and language quality code grade for languages that LGTM didn't detect in the project. If you know that code was written in a supported language that LGTM failed to detect, you can try adding that language to the project.

Project tabs

Click the tabs to find out more about the project:

  • Overview—Get a quick view of the current status of the project
  • Alerts—Review the alerts found in the latest revision
  • Files—Find alerts for specific files and directories in your project
  • Contributors—See who the main contributors are
  • Compare—Compare this project with similar projects
  • Integrations—On this tab, you can:
  • Queries—On this tab, you can:

Note that some tabs are not available if sparse analysis or upload analysis is enabled for the project.

You can also add the project to your project list (click + Follow) and run custom queries on the latest revision (click Query this project).

Project overview

By default, when you initially view a project that has historical data, the Overview tab is displayed. If no historical data is available for the project, the tab displayed by default is the Alerts tab.

You can see the current status of a project, how it's changed over time, and which commits made the biggest difference (for example: mozilla/pdf.js).

This tab is not available if your project is configured for sparse analysis or upload analysis. Your local LGTM administrator can enable these modes for your projects.

On this page, from top to bottom, you see:

  • Project controls—use these to choose a different data view, follow the project, or query the project
  • History chart—initially this shows all revisions analyzed:
    • Curves showing changes in the overall size (purple) and quality (red) of the codebase—high numbers of alerts indicate lower quality
    • Positive and negative bars showing the lines added and deleted
  • Summary—shows the current status of the project or the changes over the period selected in the history chart
  • Commit list—shows the commits shown in the chart, most recently analyzed first

Use these areas to find out more about different aspects of the project. Use the Language drop-down list to:

  • Filter the page to show data for only one language, if more than one language is analyzed.
  • Try analysis of a language that hasn't been attempted yet. For more information, see Adding a language to a project.

History chart

The chart combines a line chart and a bar chart. The line chart shows alerts (the red curve) and lines of code or comments (the purple curve). The bars of the bar chart show the number of lines of code added during a period of time. Lines added are shown as light gray bars above the x axis, and lines deleted as darker gray bars below the x axis.

History chart

Hover over the chart to show details of the alerts and lines of code change for the commit represented by that point on the chart.

Click and drag to zoom in on an area of the chart.

The curves on the chart always use a data point for every commit. In the bar chart, commits are aggregated across one or more days so that 40–50 bars are displayed—select a month of data to display one bar per day.

Summary

The summary data displayed reflects the period displayed in the history chart.

Current status

When the full history chart is displayed, the summary shows the number of active alerts and lines of code in analyzed files for the latest revision. The number of contributors identified over the whole history analyzed is also shown.

Current status

Summary for selected period

When you zoom in to a section of the history chart, the summary shows the number of commits made over that period, with the impact on alerts in the code and size of the analyzed files. Notice that the size is reported as "lines." This measures changes in the number of lines of comment as well as code, excluding white space changes.

Current status

In the example above, the 36 commits made in October 2016 added 1,300 new lines of code/comment, and deleted 160 lines of code/comment, resulting in 12 new alerts and 0 fixed alerts.

Commit list

The commit list shows the commits made in the period shown in the history chart, most recent first. It always displays the last 10 commits, or the ones made in the last 24 hours. Commits without alert changes are hidden by default.

Zoom in to the chart to focus on a particular period or commit. For example, to find the commit behind a big change in code size, or alerts, zoom in to the history chart until only a few days/commits are displayed.

Commits area

Analysis status is shown by a green dot (successfully analyzed) or red dot (analysis of one or more languages failed).

Hover over the changed Lines to show the split between added and deleted lines of code.

Click the hidden commits text to show commits with no changes to analyze. Typically these commits involve changes to code written in a language that is not analyzed, or files that are, by default, not displayed (for example, generated files).

More information

For detailed information on any commit :

  • Click Commit message to show the commit page. This includes a link to that commit in the repository, full details of any new or fixed alerts, and details of any excluded files.
  • Click the Green/red analysis status dot ( in the screenshot above) to open the log viewer. This includes the full build, import, and analysis logs for the commit and its parent commits (hovering over a dot with your mouse displays a tooltip with more information).

    For more information on logs, see Using the log viewer and Viewing extraction and analysis logs.

    Commit status

    Log files are deleted regularly to save storage space, therefore old files may no longer be available.