Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit 28d6faf

Browse files
authored
Add golangci-lint and operator-sdk as dependencies (#95)
1 parent 9342503 commit 28d6faf

File tree

6 files changed

+706
-66
lines changed

6 files changed

+706
-66
lines changed

.github/workflows/lint.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ defaults:
1818
shell: bash
1919

2020
env:
21-
GOLANGCI_VERSION: 1.29
2221
GOLANGCI_TIMEOUT: 10m0s
2322

2423
jobs:
2524

2625
lint:
2726
name: Lint
28-
runs-on: ubuntu-18.04
27+
runs-on: ubuntu-20.04
2928
steps:
3029
- name: Checkout Repository
3130
uses: actions/checkout@v2
3231
- name: Lint Code
3332
uses: golangci/[email protected]
3433
with:
35-
version: 'v${{ env.GOLANGCI_VERSION }}'
3634
args: --timeout ${{ env.GOLANGCI_TIMEOUT }}

.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ linters:
1111
- gofmt
1212
- unparam
1313
- unconvert
14-
- interfacer
1514
- structcheck
1615
- errcheck
1716
disable-all: true

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ build: binary
1414
docker build -f build/Dockerfile -t $(IMAGE):$(TAG) .
1515

1616
run-local:
17-
operator-sdk run --local
17+
go run github.com/operator-framework/operator-sdk/cmd/operator-sdk run local
1818

1919
generate-crds:
20-
operator-sdk generate k8s && operator-sdk generate crds --crd-version v1beta1
20+
go run github.com/operator-framework/operator-sdk/cmd/operator-sdk generate k8s && operator-sdk generate crds --crd-version v1beta1
2121

2222
lint:
23-
golangci-lint run
23+
go run github.com/golangci/golangci-lint/cmd/golangci-lint run
2424

2525
generate-metadata: generate-crds
26-
operator-sdk generate csv --csv-version=$(TAG) --from-version=$(OLD_TAG) --make-manifests=false
26+
go run github.com/operator-framework/operator-sdk/cmd/operator-sdk generate csv --csv-version=$(TAG) --from-version=$(OLD_TAG) --make-manifests=false
2727
echo "Metadata generated, please make sure you add/update fields in nginx-ingress-operator.v$(TAG).clusterserviceversion.yaml"
2828

2929
generate-bundle:

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.16
44

55
require (
66
github.com/go-logr/logr v0.1.0
7+
github.com/golangci/golangci-lint v1.39.0
78
github.com/google/go-cmp v0.5.5
89
github.com/openshift/api v0.0.0-20200701144905-de5b010b2b38
910
github.com/operator-framework/operator-sdk v0.18.2

0 commit comments

Comments
 (0)