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
4 changes: 4 additions & 0 deletions .github/workflows/failpoint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
- run: |
make gofail-enable
make test-failpoint
4 changes: 4 additions & 0 deletions .github/workflows/robustness_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
- name: test-robustness
run: |
set -euo pipefail
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
exit 1
;;
esac
- name: golangci-lint
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
4 changes: 4 additions & 0 deletions .github/workflows/tests_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
- run: make coverage
4 changes: 4 additions & 0 deletions .github/workflows/tests_arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
- run: make coverage
6 changes: 5 additions & 1 deletion .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
;;
esac
shell: bash
- name: golangci-lint
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
Expand All @@ -54,4 +54,8 @@ jobs:
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.1.6
- run: make coverage
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
formatters:
enable:
- gci
- gofmt
- goimports
settings: # please keep this alphabetized
gci:
sections:
- standard
- default
- prefix(go.etcd.io)
goimports:
local-prefixes:
- go.etcd.io # Put imports beginning with prefix after 3rd-party packages.
Expand Down
3 changes: 2 additions & 1 deletion bolt_aix.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"time"
"unsafe"

"go.etcd.io/bbolt/internal/common"
"golang.org/x/sys/unix"

"go.etcd.io/bbolt/internal/common"
)

// flock acquires an advisory lock on a file descriptor.
Expand Down
3 changes: 2 additions & 1 deletion bolt_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"time"
"unsafe"

"go.etcd.io/bbolt/internal/common"
"golang.org/x/sys/unix"

"go.etcd.io/bbolt/internal/common"
)

// flock acquires an advisory lock on a file descriptor.
Expand Down
3 changes: 2 additions & 1 deletion bolt_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"time"
"unsafe"

"go.etcd.io/bbolt/internal/common"
"golang.org/x/sys/unix"

"go.etcd.io/bbolt/internal/common"
)

// flock acquires an advisory lock on a file descriptor.
Expand Down
5 changes: 2 additions & 3 deletions cmd/bbolt/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ import (
"sync"
"testing"

"go.etcd.io/bbolt/internal/btesting"
"go.etcd.io/bbolt/internal/guts_cli"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

bolt "go.etcd.io/bbolt"
main "go.etcd.io/bbolt/cmd/bbolt"
"go.etcd.io/bbolt/internal/btesting"
"go.etcd.io/bbolt/internal/guts_cli"
)

// Ensure the "info" command can print information about a database.
Expand Down
4 changes: 2 additions & 2 deletions movebucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"path/filepath"
"testing"

"github.com/stretchr/testify/require"

"go.etcd.io/bbolt"
"go.etcd.io/bbolt/errors"
"go.etcd.io/bbolt/internal/btesting"

"github.com/stretchr/testify/require"
)

func TestTx_MoveBucket(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions tests/dmflakey/dmflakey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"testing"
"time"

testutils "go.etcd.io/bbolt/tests/utils"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/sys/unix"

testutils "go.etcd.io/bbolt/tests/utils"
)

func TestMain(m *testing.M) {
Expand Down
4 changes: 2 additions & 2 deletions tests/robustness/powerfailure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"testing"
"time"

"go.etcd.io/bbolt/tests/dmflakey"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/sys/unix"

"go.etcd.io/bbolt/tests/dmflakey"
)

var panicFailpoints = []string{
Expand Down