Welcome to Code Kaiser, the no-nonsense headless code review tool for GitHub.
Pull Requests:
- Comment
!blockto stop a PR from being merged!blocks can time out if not re-addressed (configurable)
- Comment
!goodto sign off on a PR, or undo your previous block - A configurable number of
!goods are needed for the Code Kaiser PR check to pass- E.g. require three unique teammates to sign off on a PR before merge
Code Hotspots:
- Each merged pull request updates a model of "hot" files
- Hot file model plugs into a pie chart generator showing which files have been most actively worked on recent PRs
-
- Install dependencies:
sudo make install-dependencies(non-RedHat distros need to switch from DNF to CPAN, see Makefile) - Setup your repo in
data/<repo-owner-username>/<repo-name>/repo.config- Make a GitHub user access token if you haven't already
- See
data/victorkp/code-kaiser/repo.configexample
- Setup a GitHub webhook for your repo, so that your Code Kaiser instance recieves events from GitHub:
- Create a pull request! This finishes setup of CodeKaiser and allows you to complete the next step
- Setup GitHub protected branches, to force CodeKaiser checks to succeed before allowing a merge
- You can monitor your hotspot files in
data/<repo-owner>/<repo-name>/output/, which contains small and large.pngoutputs, as well as anhtmlsnippet and a CSV
Short term:
- Automated end to end testing
- More robust
!blocktimeouts (check on a timer) - More unit testing
Long term goal: static code analysis (perhaps with a convolutional neural net)
Bad Code Detection Goals
- Code is unreadable (maybe not enough comments?)
- Subroutine is very long
- Subroutine has duplicate structure to another
- Presence of
TODO - Exceptions caught but not acted upon
- Dangerous use of reflection (Java)
- Confusing/non-distinct naming
- Not checking for null arguments (unless @NonNull)
- Thread doesn't handle interruption (
InterruptedExceptionorThread.interrupted()) - Bad use of data structure
- Searching through List
- Iterating through Map




