Ripsrc is a library for analyzing source code inside a Git repo
go get -u github.com/pinpt/ripsrc
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.
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
All of this code is Copyright © 2018-2019 by Pinpoint Software, Inc. Licensed under the MIT License