Skip to content

Commit 367484d

Browse files
committed
Fix GolanCI linter conifg
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
1 parent aa17adf commit 367484d

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: golangci-lint
3030
uses: golangci/golangci-lint-action@v8
3131
with:
32-
version: v2.0.2
32+
version: v2.1.6
3333
args: --config .golangci.yml
3434

3535
- name: Build Binaries

.golangci.yml renamed to .golangci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
# Copyright (c) Abstract Machines
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
version: "2"
5+
run:
6+
timeout: 10m
7+
build-tags:
8+
- nats
29
linters:
310
default: none
411
enable:
512
- asasalint
613
- asciicheck
714
- bidichk
15+
- contextcheck
816
- copyloopvar
917
- decorder
1018
- dogsled
@@ -53,6 +61,24 @@ linters:
5361
template: |-
5462
Copyright (c) Abstract Machines
5563
SPDX-License-Identifier: Apache-2.0
64+
importas:
65+
alias:
66+
- pkg: github.com/absmach/callhome/pkg/client
67+
alias: chclient
68+
- pkg: github.com/absmach/supermq/logger
69+
alias: smqlog
70+
- pkg: github.com/absmach/supermq/pkg/errors/service
71+
alias: svcerr
72+
- pkg: github.com/absmach/supermq/pkg/errors/repository
73+
alias: repoerr
74+
- pkg: github.com/absmach/supermq/pkg/sdk/mocks
75+
alias: sdkmocks
76+
- pkg: github.com/absmach/supermq/api/http/util
77+
alias: apiutil
78+
- pkg: github.com/absmach/supermq/api/http
79+
alias: api
80+
no-unaliased: true
81+
no-extra-aliases: false
5682
misspell:
5783
ignore-rules:
5884
- mosquitto
@@ -70,6 +96,18 @@ linters:
7096
- common-false-positives
7197
- legacy
7298
- std-error-handling
99+
rules:
100+
- linters:
101+
- godot
102+
path: cli/commands_test.go
103+
- path: (.+)\.go$
104+
text: |-
105+
string `Usage:
106+
` has (\d+) occurrences, make it a constant
107+
- path: (.+)\.go$
108+
text: |-
109+
string `For example:
110+
` has (\d+) occurrences, make it a constant
73111
paths:
74112
- third_party$
75113
- builtin$

0 commit comments

Comments
 (0)