Skip to content

Commit 798be8c

Browse files
authored
Merge pull request #1188 from hybridgroup/dev
2 parents d519f4a + ee3ec68 commit 798be8c

File tree

275 files changed

+3386
-1775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+3386
-1775
lines changed

.chglog/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It is possible to test the tool by `git-chglog --init` without overriding anythi
88

99
## Usage
1010

11-
Example for a new release "v2.5.0":
11+
Example for a new release "v2.6.0":
1212

1313
```sh
1414
# optional update tool by: go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
@@ -17,14 +17,14 @@ git pull
1717
git fetch --tags
1818
git checkout dev
1919
git pull upstream dev
20-
git checkout -b rel/prepare_for_release_v250
21-
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.5.0 v2.4.0.. > .chglog/chglog_tmp.md
20+
git checkout -b rel/prepare_for_release_v260
21+
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.6.0 v2.5.0.. > .chglog/chglog_tmp.md
2222
```
2323

2424
## Compare
2525

2626
If unsure about any result of running git-chglog, just use:
27-
`git log --since=2024-11-05 --pretty="- %s"`
27+
`git log --since=2025-02-16 --pretty="- %s"`
2828

2929
## Manual adjustment
3030

.chglog/config_gobot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ info:
55
repository_url: https://github.com/hybridgroup/gobot
66
options:
77
header:
8-
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\,\\-\\*\\s]*)\\))?\\:?\\s(.*)$"
8+
pattern: "^(\\w*|1-wire)(?:\\(([\\w\\$\\.\\,\\-\\*\\s]*)\\))?\\:?\\s(.*)$"
99
pattern_maps:
1010
- Type
1111
- Scope

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version: 2
1414
jobs:
1515
"test_core_and_drivers_with_coverage":
1616
docker:
17-
- image: cimg/go:1.22
17+
- image: cimg/go:1.24
1818
steps:
1919
- checkout
2020
- run:
@@ -31,7 +31,7 @@ jobs:
3131
3232
"test_platforms":
3333
docker:
34-
- image: cimg/go:1.22
34+
- image: cimg/go:1.24
3535
steps:
3636
- checkout
3737
- run:
@@ -45,7 +45,7 @@ jobs:
4545
4646
"check_examples":
4747
docker:
48-
- image: cimg/go:1.22
48+
- image: cimg/go:1.24
4949
steps:
5050
- checkout
5151
- run:
@@ -61,7 +61,7 @@ jobs:
6161
6262
"fmt_check_examples":
6363
docker:
64-
- image: golangci/golangci-lint:v1.64.5
64+
- image: golangci/golangci-lint:v2.4.0
6565
steps:
6666
- checkout
6767
- run:

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If this is a new driver or adaptor:
2222
- [ ] I have added an example to see how to setup and use it
2323
- [ ] I have checked or build at least my new example (e.g. by run `make examples_check`)
2424

25-
If this is a Go version update:
25+
If this is a Go version or module update:
2626

2727
- [ ] go.mod to new version updated
2828
- [ ] modules updated (go get -u -t ./...)

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
name: lint
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.22'
21+
go-version: '1.24'
2222
cache: false
2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v6
24+
uses: golangci/golangci-lint-action@v7
2525
with:
2626
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
27-
version: v1.64.5
27+
version: v2.4.0
2828

2929
# Optional: working directory, useful for monorepos
3030
# working-directory: v2

.golangci.yml

Lines changed: 106 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# note: GolangCI-Lint also searches for config files in all directories from the directory of the first analyzed path up to the root.
2+
version: "2"
23
run:
34
build-tags:
45
- utils
@@ -22,22 +23,12 @@ run:
2223
# By default, it isn't set.
2324
modules-download-mode: readonly
2425

25-
issues:
26-
# Enables skipping of directories:
27-
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
28-
# Default: true
29-
exclude-dirs-use-default: false
30-
31-
# note: folders/files can not be excluded from "typecheck" anymore since v1.61.0
32-
33-
linters:
34-
enable-all: true
35-
3626
# https://golangci-lint.run/usage/linters/#enabled-by-default
3727
# note: typecheck can not be disabled, it is used to check code compilation
28+
linters:
29+
default: all
3830
disable:
39-
# deprecated:
40-
- tenv # replaced by usetesting
31+
# deprecated: none
4132
# not used for this go version: none
4233
# not used for any reason
4334
- err113 # not used (we allow error creation at return statement)
@@ -51,6 +42,7 @@ linters:
5142
- importas # not needed (there is no alias rule at the moment)
5243
- ireturn # not used (we allow return interfaces)
5344
- loggercheck # not needed (relates to kitlog, klog, logr, zap)
45+
- noinlineerr # this violates best practices in other style guides
5446
- paralleltest # not used
5547
- promlinter # not needed (prometheus metrics naming)
5648
- rowserrcheck # not needed (sql related)
@@ -63,6 +55,7 @@ linters:
6355
- dupl # useful with some tweeks (reduce bugs and lines of code)
6456
- errname # useful for common style
6557
- exhaustruct # useful with some exclusions for existing code (e.g. mavlink/common/common.go)
58+
- funcorder # common style, but too many findings
6659
- funlen # useful with some tweeks (reduce bugs, simplify code, better understandable code)
6760
- gocognit # useful with some tweeks (better understandable code)
6861
- goconst # useful (reduce bugs)
@@ -74,95 +67,115 @@ linters:
7467
- mnd # useful with some exclusions for existing code (e.g. mavlink.go)
7568
- nestif # useful (reduce bugs, simplify code, better understandable code)
7669
- nlreturn # more common style, but could become annoying
77-
- stylecheck # useful with some tweaking (e.g. underscores in names should be allowed - we use it for constants retrieved from C/C++)
7870
- tagliatelle # maybe useful with some tweaking or excluding
7971
- varnamelen # maybe useful with some tweaking, but many findings
8072
- whitespace # more common style, but could become annoying
8173
- wsl # more common style, but could become annoying
74+
- wsl_v5 # same as above
75+
76+
exclusions:
77+
generated: lax
78+
presets:
79+
- comments
80+
- common-false-positives
81+
- legacy
82+
- std-error-handling
83+
84+
settings:
85+
depguard:
86+
# Rules to apply.
87+
#
88+
# Variables:
89+
# - File Variables
90+
# you can still use and exclamation mark ! in front of a variable to say not to use it.
91+
# Example !$test will match any file that is not a go test file.
92+
#
93+
# `$all` - matches all go files
94+
# `$test` - matches all go test files
95+
#
96+
# - Package Variables
97+
#
98+
# `$gostd` - matches all of go's standard library (Pulled from `GOROOT`)
99+
#
100+
# Default: Only allow $gostd in all files.
101+
rules:
102+
main:
103+
# Packages that are not allowed where the value is a suggestion.
104+
deny:
105+
- pkg: github.com/pkg/errors
106+
desc: Should be replaced by standard lib errors package
107+
108+
dupword:
109+
# Keywords for detecting duplicate words.
110+
# If this list is not empty, only the words defined in this list will be detected.
111+
# Default: []
112+
keywords:
113+
- the
114+
- and
115+
- a
116+
117+
errorlint:
118+
# Default: true
119+
# %v should be used by default over %w, see https://github.com/uber-go/guide/blob/master/style.md#error-wrapping
120+
errorf: false
121+
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
122+
# Default: true
123+
errorf-multi: false
82124

83-
linters-settings:
84-
depguard:
85-
# Rules to apply.
86-
#
87-
# Variables:
88-
# - File Variables
89-
# you can still use and exclamation mark ! in front of a variable to say not to use it.
90-
# Example !$test will match any file that is not a go test file.
91-
#
92-
# `$all` - matches all go files
93-
# `$test` - matches all go test files
94-
#
95-
# - Package Variables
96-
#
97-
# `$gostd` - matches all of go's standard library (Pulled from `GOROOT`)
98-
#
99-
# Default: Only allow $gostd in all files.
100-
rules:
101-
main:
102-
# Packages that are not allowed where the value is a suggestion.
103-
deny:
104-
- pkg: "github.com/pkg/errors"
105-
desc: Should be replaced by standard lib errors package
125+
gocritic:
126+
disabled-checks:
127+
- assignOp # very opinionated
128+
- appendAssign # mostly used by intention
106129

107-
dupword:
108-
# Keywords for detecting duplicate words.
109-
# If this list is not empty, only the words defined in this list will be detected.
110-
# Default: []
111-
keywords:
112-
- "the"
113-
- "and"
114-
- "a"
130+
nolintlint:
131+
# Enable to require an explanation of nonzero length after each nolint directive.
132+
# Default: false
133+
require-explanation: true
134+
# Enable to require nolint directives to mention the specific linter being suppressed.
135+
# Default: false
136+
require-specific: true
115137

116-
errorlint:
117-
# Default: true
118-
# %v should be used by default over %w, see https://github.com/uber-go/guide/blob/master/style.md#error-wrapping
119-
errorf: false
120-
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
121-
# Default: true
122-
errorf-multi: false
138+
perfsprint:
139+
# Optimizes `fmt.Errorf`.
140+
# Default: true
141+
errorf: false
142+
# Optimizes `fmt.Sprintf` with only one argument
143+
# Default: true
144+
sprintf1: false
123145

124-
gci:
125-
# Section configuration to compare against.
126-
# Section names are case-insensitive and may contain parameters in ().
127-
# The default order of sections is `standard > default > custom > blank > dot`,
128-
# If `custom-order` is `true`, it follows the order of `sections` option.
129-
# Default: ["standard", "default"]
130-
sections:
131-
- standard # Standard section: captures all standard packages.
132-
- default # Default section: contains all imports that could not be matched to another section type.
133-
- prefix(gobot.io/x/gobot/) # Custom section: groups all imports with the specified Prefix.
134-
#- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
135-
#- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
136-
# Enable custom order of sections.
137-
# If `true`, make the section order the same as the order of `sections`.
138-
# Default: false
139-
custom-order: true
146+
revive:
147+
rules:
148+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
149+
# disable this rule, because sometimes it has its justification
150+
- name: unexported-return
151+
severity: warning
152+
disabled: true
140153

141-
gocritic:
142-
disabled-checks:
143-
- assignOp # very opinionated
144-
- appendAssign # mostly used by intention
145154

146-
nolintlint:
147-
# Enable to require an explanation of nonzero length after each nolint directive.
148-
# Default: false
149-
require-explanation: true
150-
# Enable to require nolint directives to mention the specific linter being suppressed.
151-
# Default: false
152-
require-specific: true
155+
formatters:
156+
enable:
157+
- gci
158+
- gofmt
159+
- gofumpt
160+
- goimports
153161

154-
perfsprint:
155-
# Optimizes `fmt.Errorf`.
156-
# Default: true
157-
errorf: false
158-
# Optimizes `fmt.Sprintf` with only one argument
159-
# Default: true
160-
sprintf1: false
162+
exclusions:
163+
generated: lax
161164

162-
revive:
163-
rules:
164-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
165-
# disable this rule, because sometimes it has its justification
166-
- name: unexported-return
167-
severity: warning
168-
disabled: true
165+
settings:
166+
gci:
167+
# Section configuration to compare against.
168+
# Section names are case-insensitive and may contain parameters in ().
169+
# The default order of sections is `standard > default > custom > blank > dot`,
170+
# If `custom-order` is `true`, it follows the order of `sections` option.
171+
# Default: ["standard", "default"]
172+
sections:
173+
- standard # Standard section: captures all standard packages.
174+
- default # Default section: contains all imports that could not be matched to another section type.
175+
- prefix(gobot.io/x/gobot/) # Custom section: groups all imports with the specified Prefix.
176+
#- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
177+
#- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
178+
# Enable custom order of sections.
179+
# If `true`, make the section order the same as the order of `sections`.
180+
# Default: false
181+
custom-order: true

0 commit comments

Comments
 (0)