Skip to content

build: add Makefile with standard targets#716

Open
osvaldoandrade wants to merge 1 commit into
mainfrom
build/makefile
Open

build: add Makefile with standard targets#716
osvaldoandrade wants to merge 1 commit into
mainfrom
build/makefile

Conversation

@osvaldoandrade

Copy link
Copy Markdown
Owner

Summary

Adds a Makefile so contributors can reproduce the PR gate locally with one command (`make ci`).

Targets

Group Targets
Build `build`, `build-server`, `build-cli`, `install`
Quality `fmt`, `vet`, `lint`
Test `test`, `test-short`, `test-integration`, `cover`, `cover-html`, `bench`
Security `sec` (govulncheck + gosec)
CI gate `ci` (vet + lint + test + cover + sec)
Tooling `tools`, `tools-fmt`, `tools-lint`, `tools-cover`, `tools-sec`
Housekeeping `tidy`, `clean`

Tooling

Dev tools install under `./bin/tools` with pinned versions:

  • golangci-lint v1.61.0
  • gofumpt v0.7.0
  • gci v0.13.5
  • govulncheck (latest)
  • gosec v2.21.4
  • go-test-coverage v2.11.4

A clean machine reaches a green build with `make ci`. No global Go tools required.

Test plan

  • `make help` lists all targets.
  • `make build` produces `bin/codeq-server` and `bin/codeq`.
  • `make ci` runs all gates locally and matches CI behavior.

Closes #660
Part of #645

Standardize build, test, lint, security and CI targets so contributors
can reproduce the PR gate locally with a single command.

Targets:
- build / build-server / build-cli / install
- fmt / vet / lint
- test / test-short / test-integration / cover / cover-html / bench
- sec (govulncheck + gosec)
- ci  (vet + lint + test + cover + sec)
- tools (installs pinned dev tools into ./bin/tools)
- tidy / clean

Dev tools are installed under ./bin/tools with pinned versions, so a
clean machine reaches a green build with 'make ci'.

Refs #645 #660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Makefile with standard targets

1 participant