Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- name: Run tests
run: go test ./...

- name: Run vet
run: go vet ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: latest
args: --config=.golangci.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.cache/
26 changes: 26 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "2"
linters:
default: none
enable:
- errcheck
- staticcheck
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ CI runs on push and pull request via `.github/workflows/ci.yml`.
Run the same checks locally:

```bash
go test ./...
go vet ./...
task fmt
task lint
task test
```

## Project Docs
Expand Down
13 changes: 7 additions & 6 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ tasks:
cmds:
- go test ./...

vet:
desc: Run go vet checks
lint:
desc: Run golangci-lint checks
cmds:
- go vet ./...
- golangci-lint run

fmt:
desc: Format Go source files
desc: Format Go source files using golangci-lint
cmds:
- go fmt ./...
- golangci-lint run --fix --disable-all --enable gofmt

build:
desc: Build the envault CLI
Expand All @@ -30,5 +30,6 @@ tasks:
ci:
desc: Run local checks aligned with CI
cmds:
- task: fmt
- task: lint
- task: test
- task: vet
6 changes: 1 addition & 5 deletions docs/features/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ Without CI, users and contributors cannot quickly trust that changes preserve be
- Use supported Go versions.
- Run:
- `go test ./...`
- `go vet ./...`

Optional follow-ups:

- `golangci-lint`
- `golangci-lint run` with `staticcheck` and `errcheck`
- race tests (`go test -race ./...`)
- coverage upload/reporting

Expand Down