Categorygithub.com/codacy/codacy-usage-report
modulepackage
0.6.1
Repository: https://github.com/codacy/codacy-usage-report.git
Documentation: pkg.go.dev

# README

codacy-usage-report

codacy-usage-report is a script that generates a CSV file with the following activity information for each contributor that has their commits analyzed on Codacy:

  • Date of creation
  • Date of the last login
  • Date of the last commit
  • Number of commits
  • Email addresses used on the commits
  • Date of removal, if applicable
  • If the contributor has an account on Codacy

The script obtains the information directly from your Codacy databases and can only be used on Codacy Self-hosted instances.

Requirements

To run codacy-usage-report you must have:

  • Codacy Self-hosted 3.1.0 or later
  • Read access to the account and analysis Codacy databases from the environment where you will run codacy-usage-report
  • Either Go or Docker installed

Configuration

Create a configuration file codacy-usage-report.yml with the example syntax below.

accountDB:
  host: localhost
  port: 5432
  database: codacy
  username: username
  password: password
  sslMode: require
analysisDB:
  host: localhost
  port: 5432
  database: codacy
  username: username
  password: password
  sslMode: require
# You may need to lower the batch size from the default value
# if you experience timeouts when running the script:
# batchSize: 10000000

You must have this configuration file in your current working directory or specify it with the flag --configFile when running codacy-usage-report.

Usage

Running codacy-usage-report using Go

To run codacy-usage-report directly using Go:

  1. Install codacy-usage-report using Go:

    go get -u github.com/codacy/codacy-usage-report
    
  2. Run codacy-usage-report:

    codacy-usage-report
    

    Note: Make sure that you have included the Go bin folder in your PATH environment variable.

Running codacy-usage-report using Docker

Alternatively, you can run codacy-usage-report using Docker:

docker run -v $PWD/codacy-usage-report.yml:/app/codacy-usage-report.yml \
           -v $PWD/codacy-usage-report:/app/result \
           codacy/codacy-usage-report:latest

Command-line options

codacy-usage-report [--configFile <configuration file path>]
                    [--outputFolder <output folder path>]
                    [--help]
  • --configFile

    Path of the codacy-usage-report.yml configuration file. The default is ./codacy-usage-report.yml.

  • --outputFolder

    Path of the output folder to store the CSV file. The default is ./result/.

  • --help

    Print usage information.

What is Codacy?

Codacy is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.

Among Codacy's features:

  • Identify new Static Analysis issues
  • Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)
  • Auto-comments on Commits and Pull Requests
  • Integrations with Slack, HipChat, Jira, YouTrack
  • Track issues Code Style, Security, Error Proneness, Performance, Unused Code and other categories

Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.

Codacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.

Free for Open Source

Codacy is free for Open Source projects.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author