Project report
This generates a report of given repositories, such as used languages, row counts and used packages. Most of the heavy lifting is done via Linguist (language stats) and Bibliothecary (package manager stats). For example if the subprojects section is the package manage system used was not supported.
Report
The report generated should like the following:
project:
name: My Awesome Project
tags: []
repos:
- path: "/tmp/repo-path/"
languages:
Kotlin: 249754
Typescript: 215432
subprojects:
- platform: npm
path: "/tmp/repo-path/front/package.json"
dependencies:
- name: clsx
requirement: "^1.1.1"
type: runtime
- name: gulp-data
requirement: "^1.3.1"
- platform: maven
path: "/tmp/repo-path/android-app/build.gradle"
dependencies:
- name: org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version
requirement: ''
type: implementation
- name: com.android.tools:desugar_jdk_libs
requirement: 1.1.5
type: coreLibraryDesugaring
Running
You can install this from rubygems:
gem install project-report
Example report for this repository:
project-report -n"Project Report" -b "OSS, Reporting" -r .
Produces:
project:
name: Project Report
tags:
- OSS
- Reporting
repos:
- path: "."
languages:
Dockerfile: 227
Ruby: 4025
subprojects:
- platform: rubygems
path: Gemfile
dependencies:
- name: github-linguist
type: runtime
requirement: ">= 0"
- name: bibliothecary
type: runtime
requirement: ">= 0"
- platform: rubygems
path: project-report.gemspec
dependencies:
- name: github-linguist
type: runtime
requirement: "= 7.16.0"
- name: bibliothecary
type: runtime
requirement: "= 7.0.2"
Use project-report –help to see options and examples.
Developing
You can use bundler to install all the required dependencies.
bundler install
Docker
If you don’t have Ruby installed, you can run this from Docker.
Build the docker image:
docker build -t project-report .
For example scan to repositories:
# Scan REPOS
REPO1=/path/to/first-own-local-computer
REPO2=/path/to-second/first-own-local-computer
docker run -i --rm -v $REPO1:$REPO1 -v $REPO2:$REPO2 -w $(pwd) -t project-report:latest "/project-report" -n"My Awesome project" -r$REPO1,$REPO2