This is currently an experimental project to work with go and bazel(isk)
To install Bazel itself:
- Install Bazel's dependencies
- Install Bazelisk (optional, but recommended)
A sample go library / binary to get to know bazel.
Run with bazelisk run //golang/hello_world:hello_world.
A formatting tool for BUILD.bazel files.
Run with: bazelisk run buildifier_format
An allround code formatter which currently uses tulip-codescheme.xml which can also be loaded in intellij File -> Code Style.
Run with bazelisk run intellij_format to format code or bazelisk run intellij_check if you only want to check for formatting errors.
It is also possible to overide the schema by adding code_scheme in the BUILD.bazel file for more instructions see README.md.
intellij_formatter(
name = "intellij_format",
code_scheme = "//mypkg/mydir:mycodescheme.xml",
)
A go code formatting tool.
Run with: bazelisk run gofmt_format
Gazelle is a build file generator for more information see bazel-gazelle
Run with: bazelisk run gazelle
A tool that adds license headers to the top of your code.
Run with: bazelisk run addlicense_format to add headers or bazelisk run addlicense_check to check if there are any headers missing.