The contents of this project has been moved to a new repository: https://github.com/sagikazarmark/mypleasings
This repository will stay here to provide backward compatibility, but it won't receive any updates. Please follow the new repositories.
Please Go rules and definitions
Note: This is still very much experimental, but please looks like a great alternative to make, I love it.
Add the following to BUILD
in your project root:
github_repo(
name = "please-go",
repo = "sagikazarmark/please-go",
revision = "master",
)
GolangCI can be executed out of the box using plz run
:
plz run ///please-go//tools/golangci-lint
Defining an alias makes the command shorter and easier to memorize:
[alias "lint"]
desc = Runs the linters for this repo
cmd = run ///please-go//tools/golangci-lint --
Then you can just run the linter by executing plz lint
. It also passes arguments to the golangci-lint run
command,
so for example plz lint -v
will run the linter in verbose mode.
The build target installs GolangCI lint by default. You can customize the installation using the following configuration in .plzconfig
:
[buildconfig]
golangci-lint-tool = ///please-go//third_party/golangci-lint
golangci-lint-version = 1.27.0
Pinning the linter version is optional, but strongly recommended.