Skip to content

Commit

Permalink
golintci: setting
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Login <batazor@evrone.com>
  • Loading branch information
batazor committed Mar 26, 2023
1 parent e5a038a commit 6cb57be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
15 changes: 2 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,6 @@ linters-settings:
# Do not allow non-required aliases.
# Default: false
no-extra-aliases: true
# List of aliases
alias:
# Using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package.
- pkg: knative.dev/serving/pkg/apis/serving/v1
alias: servingv1
# Using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package.
- pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1
alias: autoscalingv1alpha1
# You can specify the package path by regular expression,
# and alias by regular expression expansion syntax like below.
# see https://github.com/julz/importas#use-regular-expression for details
- pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+)
alias: $1$2

ireturn:
# ireturn allows using `allow` and `reject` settings at the same time.
Expand Down Expand Up @@ -879,6 +866,8 @@ linters:
- deadcode # deprecated
- varcheck # deprecated
- structcheck # deprecated
# - revive # use as a single linter
- musttag

issues:

Expand Down
2 changes: 1 addition & 1 deletion ops/Makefile/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gosec: ## Golang security checker
@docker run --rm -it -v $(pwd):/app -w /app/ securego/gosec:latest /app/...

golint: ## Linter for golang
@docker run --rm -it -v $(pwd):/app -w /app/ golangci/golangci-lint:v1.52.1-alpine golangci-lint run ./...
@docker run --rm -it -v $(pwd):/app -w /app/ golangci/golangci-lint:v1.52.2-alpine golangci-lint run ./...

test: ## Run all unit test
export CGO_ENABLED=1
Expand Down
2 changes: 1 addition & 1 deletion ops/gitlab/pipelines/test/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ golint:
- .go-cache
- .job_teplate_go
image:
name: golangci/golangci-lint:v1.52.1-alpine
name: golangci/golangci-lint:v1.52.2-alpine
entrypoint: [""]
before_script:
- mkdir -p .go
Expand Down

0 comments on commit 6cb57be

Please sign in to comment.