Skip to content
Open
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
8 changes: 2 additions & 6 deletions scripts/subtests/lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ set -o pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

set +e
golangci_lint_executable=$(which golangci-lint)
set -e
if [ -z "${golangci_lint_executable}" ] || [ ! -x "${golangci_lint_executable}" ]; then
if ! command -v golangci-lint &> /dev/null; then
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
fi

pushd "${SCRIPT_DIR}/../../src" > /dev/null
golangci-lint run ./...
popd > /dev/null

popd > /dev/null
8 changes: 5 additions & 3 deletions scripts/subtests/unit-test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if [ "${CI:-false}" = 'false' ]; then
flags="${flags} -p"
fi
pushd "${SCRIPT_DIR}/../../src" > /dev/null
go run github.com/onsi/ginkgo/v2/ginkgo $flags
popd > /dev/null

if ! command -v ginkgo &> /dev/null; then
go install github.com/onsi/ginkgo/v2/ginkgo@latest
fi
ginkgo $flags
popd > /dev/null
2 changes: 1 addition & 1 deletion src/pkg/binding/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ type drainHolder struct {
}

func newDrainHolder() drainHolder {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(context.Background()) //nolint:gosec
return drainHolder{
ctx: ctx,
cancel: cancel,
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/otelcolclient/otelcolclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewGRPCWriter(addr string, tlsConfig *tls.Config, l *log.Logger) (*GRPCWrit
return nil, err
}

ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(context.Background()) //nolint:gosec
w := &GRPCWriter{
msc: colmetricspb.NewMetricsServiceClient(cc),
tsc: coltracepb.NewTraceServiceClient(cc),
Expand Down
Loading