Skip to content

Commit bafb91f

Browse files
Bump golangci/golangci-lint-action from 7 to 8 (#6)
* Bump golangci/golangci-lint-action from 7 to 8 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 7 to 8. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v7...v8) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Updated linter (and added config) * Remocved exclusions * Fixed prefix --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert-Stam <[email protected]>
1 parent 87811bf commit bafb91f

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed

.github/workflows/pr-workflow.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
files=$(gofmt -l .) && echo $files && [ -z "$files" ]
3535
3636
- name: Golang CI Lint
37-
uses: golangci/golangci-lint-action@v7
37+
uses: golangci/golangci-lint-action@v8
3838
with:
39-
version: v2.0.1
39+
version: v2.1.6
4040
args: --timeout 10m
4141

4242
unit-tests:

.golangci.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: "2"
2+
linters:
3+
enable:
4+
- bodyclose
5+
- containedctx
6+
- contextcheck
7+
- errorlint
8+
- goconst
9+
- godot
10+
- importas
11+
- nilerr
12+
- promlinter
13+
- revive
14+
- sloglint
15+
- testifylint
16+
- unparam
17+
- usestdlibvars
18+
settings:
19+
importas:
20+
alias:
21+
- pkg: ^k8s\.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)$
22+
alias: $1$2
23+
revive:
24+
rules:
25+
- name: exported
26+
exclusions:
27+
generated: lax
28+
paths:
29+
- generated.*\.go$
30+
- third_party$
31+
- builtin$
32+
- examples$
33+
formatters:
34+
enable:
35+
- gci
36+
- gofmt
37+
- goimports
38+
settings:
39+
gci:
40+
sections:
41+
- standard # Standard section: captures all standard packages.
42+
- default # Default section: contains all imports that could not be matched to another section type.
43+
- prefix(github.com/qdrant) # Custom section: groups all imports with the specified Prefix (our company, but our own component).
44+
- prefix(github.com/qdrant/qdrant-cloud-buf-plugin/) # Custom section: groups all imports with the specified Prefix (this component).
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- generated.*\.go$
49+
- third_party$
50+
- builtin$
51+
- examples$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
3838
GCI = $(LOCALBIN)/gci
3939

4040
## Tool Versions
41-
GOLANGCI_LINT_VERSION ?= v2.0.1
41+
GOLANGCI_LINT_VERSION ?= v2.1.6
4242
GCI_VERSION ?= v0.13.5
4343

4444
.PHONY: bootstrap

cmd/buf-plugin-required-fields/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func getRequiredEntityFields(request check.Request) ([]string, error) {
137137

138138
// extractEntityNames returns a set of entity names inferred from the name of
139139
// the service methods.
140-
// e.g: [ListBooks, GetBook] -> {Book}
140+
// e.g: [ListBooks, GetBook] -> {Book}.
141141
func extractEntityNames(fileDescriptor descriptor.FileDescriptor) map[string]struct{} {
142142
entityNames := make(map[string]struct{})
143143
services := fileDescriptor.FileDescriptorProto().GetService()
@@ -152,7 +152,7 @@ func extractEntityNames(fileDescriptor descriptor.FileDescriptor) map[string]str
152152
return entityNames
153153
}
154154

155-
// inferEntityFromMethodName extracts the entity name by stripping CRUD prefixes
155+
// inferEntityFromMethodName extracts the entity name by stripping CRUD prefixes.
156156
func inferEntityFromMethodName(methodName string) string {
157157
p := pluralize.NewClient()
158158
for _, prefix := range crudMethodPrefixes {

0 commit comments

Comments
 (0)