Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.21 KB

File metadata and controls

33 lines (22 loc) · 1.21 KB
title Languages and lines of code
description You can import an analysis of languages used in a project, including lines of code.
audience opensource
draft false
weight 10
aliases
/en/open_source/languages

Import of languages for a project

You can import JSON reports generated by the cloc tool via the API:

Import of cloc JSON file

When importing a file, all language information for the respective project will be deleted first and then populated with the content of the file. Please make sure to use the --json parameter when invoking the cloc command, to get the correct file format.

Display

The results of the import are shown on the left side of the product details page.

Display of languages

The colors are defined by entries in the table Language_Type, which has been prepopulated with data from GitHub.

Import of language types

GitHub updates its language colors from time to time, when new languages emerge. The management command

./manage.py import_github_languages

reads data from a JSON file hosted in https://github.com/ozh/github-colors to add new languages and update colors.