https://github.com/meyskens/fetch-comments
Using Go-Git and bblfsh to fetch comments from Git repositories
https://github.com/meyskens/fetch-comments
code-analysis comments git
Last synced: 2 months ago
JSON representation
Using Go-Git and bblfsh to fetch comments from Git repositories
- Host: GitHub
- URL: https://github.com/meyskens/fetch-comments
- Owner: meyskens
- Created: 2018-09-17T11:11:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T16:37:21.000Z (almost 8 years ago)
- Last Synced: 2025-01-22T05:17:19.861Z (over 1 year ago)
- Topics: code-analysis, comments, git
- Language: Go
- Size: 3.64 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fetch Comments
==============
This is a simple Go script that fetched all comments from a Git repository to train an [ML model to detect typos](https://github.com/irinakhismatullina/style-analyzer/tree/feature/typos-analyzer/lookout/style/typos_checker) in code comments.
This project uses [bblfsh](https://bblf.sh/v2.6.1/) and [go-git](https://github.com/src-d/go-git) to do this.
## How to use
To use bblfsh you will need a server set up using Docker.
`docker run -d --name bblfshd --privileged -p 9432:9432 -v /var/lib/bblfshd:/var/lib/bblfshd bblfsh/bblfshd`
You will also need to have drivers for the languages you need to use. Since we want diverse data I suggest just installing all using:
`docker exec -it bblfshd bblfshctl driver install --all`
Now that bblfshd is running you can start running this repo.
Currently the repos to analyse are listed in `main.go`
```
var repos = map[string]string{
// "file name": "git url"
"freeCodeCamp.coment": "https://github.com/freeCodeCamp/freeCodeCamp",
"vue.coment": "https://github.com/vuejs/vue",
"springboot.coment": "https://github.com/spring-projects/spring-boot",
"moby.coment": "https://github.com/moby/moby",
}
```
(This should be improved)
## Provided comment lists
This projects analyses a few popular open source projects and uploads the artifacts to S3 using Travis CI (thank you for the free build time!). You can find these at https://s3.eu-west-3.amazonaws.com/fetch-comments/