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
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v6
with:
go-version: '1.24'
go-version: '1.25'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: v2.10
args: --timeout=5m

- name: Run go fmt
Expand Down
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "2"

linters:
disable:
- errcheck # Disabled for CLI tool - output errors are typically unrecoverable

run:
timeout: 5m
go: "1.25"
259 changes: 0 additions & 259 deletions COMPLETION.md

This file was deleted.

2 changes: 1 addition & 1 deletion Containerfile.download
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile is used to cross-build the kubectl-oadp binaries for all platforms
# It also builds a Go server that serves the built binaries

FROM --platform=$BUILDPLATFORM golang:1.24 AS builder
FROM --platform=$BUILDPLATFORM golang:1.25 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
17 changes: 2 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,24 +358,11 @@ $(LOCALBIN):
mkdir -p $(LOCALBIN)

# Tool versions
GOLANGCI_LINT_VERSION ?= v1.63.4
GOLANGCI_LINT_VERSION ?= v2.11.0

# Tool binaries
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint

# go-install-tool will 'go install' any package $2 and install it to $1.
define go-install-tool
[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(LOCALBIN) go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef

# golangci-lint installation
.PHONY: golangci-lint
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary
Expand All @@ -384,7 +371,7 @@ $(GOLANGCI_LINT): $(LOCALBIN)
echo "golangci-lint $(GOLANGCI_LINT_VERSION) is already installed"; \
else \
echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION)"; \
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)); \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(LOCALBIN) $(GOLANGCI_LINT_VERSION); \
fi

# Testing targets
Expand Down
31 changes: 31 additions & 0 deletions cmd/completion/completion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright 2025 The OADP CLI Contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package completion

import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/cmd/config/completion"
)

// NewCommand creates the completion command with install subcommand
func NewCommand() *cobra.Command {
cmd := completion.NewCommand()

cmd.AddCommand(NewInstallCommand())

return cmd
}
Loading
Loading