Skip to content

Latest commit

 

History

History
100 lines (68 loc) · 2.47 KB

CONTRIBUTING.md

File metadata and controls

100 lines (68 loc) · 2.47 KB

Contributing

We ❤️ every form of contribution. The following document aims to provide enough context to work with our codebase and to open pull requests that follow our convention. If this document does not provide enough help, open a new issue and we'll gladly help you get started.

Pull Requests

When opening a Pull Request, check that:

  • Tests are passing
  • Code is linted
  • Description references the issue
  • The branch name follows our convention
  • Commits are squashed and follow our conventions

Work with the code

The Airy Bazel tools use Bazel to build and test itself. We suggest you to install bazelisk, a small utility that will install the right version of Bazel for you given the .bazelversion

Build

You can build the whole project using the following command:

bazel build //...

and build a specific project like so:

bazel build //lint:all

Lint

We use buildifier to lint our Bazel files. To execute the buildifier linter run:

bazel run //:check

You can also run:

bazel run //:fix

to try fixing issues automatically.

Managing dependencies

If you add, remove, or change a dependency from the maven_install, you must re-pin dependencies using the following command:

bazel run @unpinned_maven//:pin

Exploring the code base

Bazel has an extensive query language you can use to dig deeper into projects. Here are a few examples:

# show all deps of a given project
bazel query "deps(//lint:all)" --output label

# show the available tests of a given project
bazel query "tests(//lint:all)" --output label

# show all the packages under a specific path
bazel query "lint/..." --output package

If you are not familiar with a specific project, you can also run the following query:

bazel query "lint/..."

The query shows all the targets produced under that specified package. It can help with getting started.

Bazel also offers a friendly and powerful autocompletion, please refer to this document to install it locally.

Naming conventions

Please refer to our open source naming convention