• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Source Deps Reviewer
2
3## Synopsis
4
5This is a tool for labeling dependencies with a web interface.
6
7Basically, it greps the specified directory for the given pattern,
8and let human reviewers label their dependencies, even code dependencies,
9which are code segments that are highly related to the specific pattern.
10
11## Installation and Dependencies
12
13This tool depends on [codesearch](https://github.com/google/codesearch)
14to generate regular expression index, please install them with:
15
16```
17$ go get github.com/google/codesearch/cmd/cindex
18$ go get github.com/google/codesearch/cmd/csearch
19```
20
21This tool depends on several Python packages,
22
23```
24$ pip install -e .
25```
26
27To run functional test, please do
28
29```
30$ pip install -e .[dev]
31```
32
33Prism, a code syntax highlighter is used.
34It can be found at https://github.com/PrismJS/prism
35
36## Usage
37
38Initialize a project:
39
40```
41sourcedr init --source-dir [android-src] [project-dir]
42```
43
44Scan the codebase:
45
46```
47sourcedr scan
48```
49
50If there are occurrences that are not reviewed, then review the occurrences
51with:
52
53```
54sourcedr review
55```
56
57Open browser and visit [http://localhost:5000](http://localhost:5000).
58
59
60## Testing
61
62```
63$ python3 sourcedr/functional_tests.py
64```
65