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

Add golangci-lint and operator-sdk as dependencies #95

Merged
merged 1 commit into from
Apr 14, 2021
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: 1 addition & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ defaults:
shell: bash

env:
GOLANGCI_VERSION: 1.29
GOLANGCI_TIMEOUT: 10m0s

jobs:

lint:
name: Lint
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Lint Code
uses: golangci/[email protected]
with:
version: 'v${{ env.GOLANGCI_VERSION }}'
args: --timeout ${{ env.GOLANGCI_TIMEOUT }}
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ linters:
- gofmt
- unparam
- unconvert
- interfacer
- structcheck
- errcheck
disable-all: true
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ build: binary
docker build -f build/Dockerfile -t $(IMAGE):$(TAG) .

run-local:
operator-sdk run --local
go run github.com/operator-framework/operator-sdk/cmd/operator-sdk run local

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

lint:
golangci-lint run
go run github.com/golangci/golangci-lint/cmd/golangci-lint run

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

generate-bundle:
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.16

require (
github.com/go-logr/logr v0.1.0
github.com/golangci/golangci-lint v1.39.0
github.com/google/go-cmp v0.5.5
github.com/openshift/api v0.0.0-20200701144905-de5b010b2b38
github.com/operator-framework/operator-sdk v0.18.2
Expand Down
Loading