pinpt / ripsrc

Library for ripping through git repos to analyze the source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Library for ripping through git repos to analyze the source code

License:MIT License


Languages

Language:Go 99.5%Language:Makefile 0.5%