Skip to content

Commit 86c5fbc

Browse files
authored
Document pre-requisites for development (#18)
The `README` doesn't explicitly tell users about what other infrastructure they will need to successfully run the codemod (Python, Semgrep, etc). This change fixes that and closes #17 .
1 parent 46866a8 commit 86c5fbc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,31 @@ The newer methods in `java.nio.file.Files` replaced the need for some of communi
1414
+ List<String> lines = Files.readAllLines(file.toPath());
1515
```
1616

17+
# Setup
18+
19+
1. Install JDK 17 for building this project. We recommend [Eclipse Adoptium](https://adoptium.net/)
20+
21+
1. Install [Semgrep](https://semgrep.dev/) CLI. See
22+
[here](https://semgrep.dev/docs/getting-started/#installing-and-running-semgrep-locally)
23+
for instructions. It can usually be done via `pip`:
24+
```shell
25+
pip install semgrep
26+
```
27+
28+
If your Python library paths contain your home directory as a root folder (i.e.
29+
due to the use of the `$HOME` environment variable), you may need to manually
30+
set up your `PYTHONPATH` for tests:
31+
32+
```shell
33+
PYTHONPATH=$HOME/<subpath-to-python-libs-folder> ./gradlew check
34+
```
35+
36+
You can check your python paths with:
37+
38+
```shell
39+
python -m site
40+
```
41+
1742
# Testing
1843

1944
```bash

0 commit comments

Comments
 (0)