Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Latest commit

 

History

History
52 lines (39 loc) · 1.04 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.04 KB
pinpt-logo

Ripsrc is a library for analyzing source code inside a Git repo

Install

go get -u github.com/pinpt/ripsrc

Usage

You can use the example command line implementation provided.

ripsrc code <gitfolder>

This will rip through all the commits in history order (oldest to newest), analyze each file and dump out some basic results.

API

This repo is meant to mainly be used as a library:

results := make(chan ripsrc.BlameResult, 100)
resultsDone := make(chan bool, 1)
go func(){
	for r := range results {
		fmt.Println(r)
	}
	resultsDone <- true
}()

opts := &ripsrc.Opts{}
opts.RepoDir = filepath.Join(dir, "myrepo_dir")
opts.CheckpointsDir = ...
rip := ripsrc.New(opts)
err := rip.Code(ctx, results)
if err != nil {
	log.Fatal("error", err)
}
<-resultsDone

License

All of this code is Copyright © 2018-2019 by Pinpoint Software, Inc. Licensed under the MIT License