Languages and lines of code

You can import an analysis of languages used in a project, including lines of code.

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.