Skip to content

Latest commit

 

History

History
139 lines (88 loc) · 3.29 KB

CONTRIBUTING.md

File metadata and controls

139 lines (88 loc) · 3.29 KB

Contribution Guidelines

As all source{d} projects, this project follows the source{d} Contributing Guidelines.

Additional Contribution Guidelines

In addition to the source{d} Contributing Guidelines, this project follows the following guidelines.

Generated Code

Before submitting a pull request make sure all the generated code changes are also committed.

kallax

To generate go code from kallax models, run:

$ go generate ./...

To update embedded migrations with the new files:

$ make dependencies
$ kallax migrate --input ./store/models/ --out ./store/migrations --name <name>
$ make pack-migrations

Dependencies

Go dependencies are managed with dep. Use make godep to make sure the vendor directory is up to date, and commit any necessary changes.

TOC

Please update the readme Table of Contents with:

$ make toc

Build

You can separately build the binaries provided by source{d} Lookout; the binaries will be stored under build/bin directory.

Server

$ make build

lookout-sdk

$ make -f Makefile.sdk build

Testing

For unit-tests run:

$ make test

For lookout-sdk integration tests (-short will skip tests that require bblfsh):

$ make test-sdk
$ make test-sdk-short

For lookoutd serve integration tests:

$ make test-json

Web Interface

If you want to contribute in source{d} Lookout Web Interface, you should consider the following:

Dependencies

Node.js >=8 is required; you can check which version of node do you have, running:

$ node -v
v10.15.0

Running

In case you want to locally run the web interface from sources, you can choose one of the following:

  • using web assets from binaries (embeded by esc), that will require you to restart the server everytime you change any web asset.
    $ make -f Makefile.web web-serve
    And navigate to http://127.0.0.0:8080
  • using create-react-app dev server, with live reload for web assets changes, running in separated terminals the backend:
    $ make -f Makefile.web web-start
    and the frontend:
    $ make -f Makefile.web web-dependencies # if you didn't do it yet
    $ yarn --cwd frontend start
    Configure the GitHub App authorization callback URL to http://127.0.0.0:3000/callback, and navigate to http://127.0.0.0:3000

Testing

For unit-tests over the Web Interface frontend:

$ make -f Makefile.web web-dependencies # if you didn't do it yet
$ make -f Makefile.web web-test

dummy Analyzer

dummy analyzer is part of the source{d} Lookout codebase but its release cycle is managed independently from the main one.

dummy analyzer container images will be published everytime it's created a new tag with the dummy prefix, e.g. dummy-v0.0.1

It can be built locally running:

$ make -f Makefile.dummy build