# PR Review Process
## Revision Steps
1. Read PR information
2. PR Local Setup
3. Compile Project
4. Run unit / functional tests
5. Go commit by commit (starting with the 1st) and check the changes
6. Note down doubts / strange behaviours/approaches
7. Review PR comments
8. Try to answer PR questions from PR Review club
## Pull Request Local Setup
Configure VSCode for displaying gitdiff. Run on the command line:
```
code ~/.gitconfig
```
Include the following and save the file
```
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
```
Run **git difftool** commit1 commit2, for prompting the files on VSCode.
Fetch the Pull Request to your local, by its PR id:
```
git fetch origin pull/*ID*/head:*BRANCHNAME*
```
Checkout to new branch:
```
git checkout *BRANCHNAME*
```
Check current commit hash:
```
git rev-parse HEAD
```
See last commits and commits hashes. They are ordered from last commit until first one:
```
git log
```
Check differences between 2 commits:
```
git diff *commit1*..**commit2**
git diff HEAD1~..HEAD3~ // diff between current state of repo -1 commit and minus 3 commits in the past
```
Check for moved items specifically
```
git diff <old commit hash> <new commit hash> --color-moved=dimmed_zebra --color-moved-ws=allow-indentation-change"
```
Search for specific words:
```
git grep 'Consensus::DEPLOYMENT_TAPROOT'
```
## Run Tests
```
make check
```
Unit Tests:
```
src/test/test_bitcoin
```
Functional Tests:
```
test/functional/test_runner.py
```
## Compile Project
```
./contrib/install_db4.sh `pwd`
```
```
./autogen.sh
```
```
export BDB_PREFIX='<PATH-TO>/db4'
```
```
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
```
```
make -j"$(($(nproc)+1))"
```
## vim
```
vim
:NERDTree
```
Vim notes
```
o open vertical tab
s open vertical tab
:q close
CTRL w + v open vertical tab
CTRL w + s open horizontal tab
:vimgrep /path_to_command/gj ./**/*.rb
Run the :cw command after the grep is done, and the list of files and locations will show up:
```
```
Ctrl + ww cycle though all windows
Ctrl + wh takes you left a window
Ctrl + wj takes you down a window
Ctrl + wk takes you up a window
Ctrl + wl takes you right a window
```
## ctags
Run ctags recursively over the entire folder of your choice to generate the tags file
```
ctags -R *
ctrl ]
ctrl O
```
### ctagsx VS Extension
```
ctrl T
alt T
```
https://www.twitch.tv/videos/1262409992