Skip to content

Commit 4a19dee

Browse files
authored
Merge pull request #1094 from hybridgroup/dev
release: prepare for release 2.4.0
2 parents ed0c79a + b5f5ac6 commit 4a19dee

File tree

645 files changed

+11207
-8263
lines changed

Some content is hidden

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

645 files changed

+11207
-8263
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.3.0":
11+
Example for a new release "v2.4.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_v230
21-
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.3.0 v2.2.0.. > .chglog/chglog_tmp.md
20+
git checkout -b rel/prepare_for_release_v240
21+
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.4.0 v2.3.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=2023-10-30 --pretty="- %s"`
27+
`git log --since=2024-01-07 --pretty="- %s"`
2828

2929
## Manual adjustment
3030

.circleci/config.yml

Lines changed: 20 additions & 3 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.19
17+
- image: cimg/go:1.22
1818
steps:
1919
- checkout
2020
- run:
@@ -31,7 +31,7 @@ jobs:
3131
3232
"test_platforms":
3333
docker:
34-
- image: cimg/go:1.19
34+
- image: cimg/go:1.22
3535
steps:
3636
- checkout
3737
- run:
@@ -45,7 +45,7 @@ jobs:
4545
4646
"check_examples":
4747
docker:
48-
- image: cimg/go:1.19
48+
- image: cimg/go:1.22
4949
steps:
5050
- checkout
5151
- run:
@@ -59,10 +59,27 @@ jobs:
5959
SOME=$(grep -L 'digispark' $(grep -L 'gocv' ${ALL}))
6060
for e in ${SOME} ; do go vet "${e}" ; done
6161
62+
"fmt_check_examples":
63+
docker:
64+
- image: golangci/golangci-lint:v1.61.0
65+
steps:
66+
- checkout
67+
- run:
68+
name: Debug linter version
69+
command: golangci-lint --version
70+
- run:
71+
# digispark needs libusb, opencv needs opencv
72+
name: Check examples for linter issues (except digispark, opencv)
73+
command: |
74+
ALL=$(grep -l -r --include "*.go" 'build example' ./)
75+
SOME=$(grep -L 'digispark' $(grep -L 'gocv' ${ALL}))
76+
for e in ${SOME} ; do golangci-lint run "${e}" --build-tags example --disable forcetypeassert --disable noctx ; done
77+
6278
workflows:
6379
version: 2
6480
build:
6581
jobs:
6682
- "test_core_and_drivers_with_coverage"
6783
- "test_platforms"
6884
- "check_examples"
85+
- "fmt_check_examples"

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ 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:
26+
27+
- [ ] go.mod to new version updated
28+
- [ ] modules updated (go get -u -t ./...)
29+
- [ ] CI files updated
30+
- [ ] linter setting and linter version (if a newer one exist) updated
31+
- [ ] linter issues fixed or suppressed by config
32+
2533
If this is a PR for release:
2634

2735
- [ ] The PR's target branch is 'hybridgroup:release'

.github/workflows/golangci-lint.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,28 @@ jobs:
1515
name: lint
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-go@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.19'
21+
go-version: '1.22'
2222
cache: false
2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v3
24+
uses: golangci/golangci-lint-action@v6
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.55.2
27+
version: v1.61.0
2828

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

3232
# Optional: golangci-lint command line arguments.
33-
# mostly there is no problem locally, but on server: "could not import C (cgo preprocessing failed) (typecheck)"
34-
# and the digispark adaptor can not be build since switch to linter version 1.54.2
35-
args: --skip-files="platforms/digispark/littleWire.go,platforms/digispark/digispark_adaptor.go"
33+
# Note: exclude arguments, e.g. --exclude-files="my_file", will not affect the "typecheck" linter,
34+
# at least since v1.61.0 - use build tags instead.
35+
#args: --exclude-files="platforms/digispark/digispark_adaptor.go"
3636

3737
# Optional: show only new issues if it's a pull request. The default value is `false`.
3838
# only-new-issues: true
3939

4040
# Optional: if set to true then the all caching functionality will be complete disabled,
4141
# takes precedence over all other caching options.
4242
# skip-cache: true
43-
44-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
45-
# skip-pkg-cache: true
46-
47-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
48-
# skip-build-cache: true

.golangci.yml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,43 @@ run:
2222
# By default, it isn't set.
2323
modules-download-mode: readonly
2424

25+
issues:
2526
# Enables skipping of directories:
2627
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
2728
# Default: true
28-
skip-dirs-use-default: false
29+
exclude-dirs-use-default: false
2930

30-
# note: examples will be currently omitted by the build tag
31-
skip-dirs:
32-
- platforms/opencv
31+
# note: folders/files can not be excluded from "typecheck" anymore since v1.61.0
3332

3433
linters:
3534
# currently active linters:
3635
#
37-
# INFO [lintersdb] Active 64 linters: [asasalint asciicheck bidichk bodyclose containedctx contextcheck decorder depguard dogsled dupword durationcheck
38-
# errcheck errchkjson errorlint exportloopref forcetypeassert gci gocheckcompilerdirectives gochecknoinits gochecksumtype gocritic gofmt gofumpt goimports
39-
# gomoddirectives gomodguard goprintffuncname gosec gosimple govet grouper inamedparam ineffassign lll makezero mirror misspell musttag nakedret nilerr nilnil
40-
# noctx nolintlint nonamedreturns nosprintfhostport perfsprint prealloc predeclared protogetter reassign revive sloglint staticcheck tagalign tenv
41-
# testableexamples testifylint thelper tparallel unconvert unparam unused usestdlibvars wastedassign]
36+
# INFO [lintersdb] Active 67 linters: [asasalint asciicheck bidichk bodyclose canonicalheader containedctx
37+
# contextcheck decorder depguard dogsled dupword durationcheck errcheck errchkjson errorlint fatcontext
38+
# forcetypeassert gci gocheckcompilerdirectives gochecknoinits gochecksumtype gocritic gofmt gofumpt goimports
39+
# gomoddirectives gomodguard goprintffuncname gosec gosimple govet grouper inamedparam ineffassign lll makezero
40+
# mirror misspell mnd musttag nakedret nilerr nilnil noctx nolintlint nonamedreturns nosprintfhostport perfsprint
41+
# prealloc predeclared protogetter reassign revive sloglint spancheck staticcheck tagalign tenv testableexamples
42+
# testifylint thelper tparallel unconvert unparam unused usestdlibvars wastedassign]
4243

4344
enable-all: true
4445

4546
# https://golangci-lint.run/usage/linters/#enabled-by-default
4647
# note: typecheck can not be disabled, it is used to check code compilation
4748
disable:
48-
# deprecated
49-
- deadcode # deprecated
50-
- exhaustivestruct # deprecated
51-
- golint # deprecated
52-
- ifshort # deprecated
53-
- interfacer # deprecated
54-
- maligned # deprecated
55-
- nosnakecase # deprecated
56-
- scopelint # deprecated
57-
- structcheck # deprecated
58-
- varcheck # deprecated
49+
# deprecated:
50+
- exportloopref # Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar
51+
- gomnd # The linter has been renamed. Replaced by mnd.
52+
# not used for this go version: none
5953
# not used for any reason
54+
- err113 # not used (we allow error creation at return statement)
6055
- execinquery # not needed (no sql)
6156
- exhaustive # not used (we allow incomplete usage of enum switch, e.g. with default case)
6257
- forbidigo # not used (we allow print statements)
6358
- ginkgolinter # not needed (enforces standards of using ginkgo and gomega)
6459
- gochecknoglobals # not used (we allow definition of unexposed variables at top level)
6560
- godot # not used (seems to be counting peas)
6661
- godox # not used (we have many TODOs, so not useful)
67-
- goerr113 # not used (we allow error creation at return statement)
6862
- gosmopolitan # not needed (report i18n/l10n anti-patterns)
6963
- importas # not needed (there is no alias rule at the moment)
7064
- ireturn # not used (we allow return interfaces)
@@ -86,9 +80,10 @@ linters:
8680
- goconst # useful (reduce bugs)
8781
- gocyclo # useful with some tweeks (better understandable code)
8882
- goheader # useful, if we introduce a common header (e.g. for copyright)
89-
- gomnd # useful with some exclusions for existing code (e.g. mavlink.go)
9083
- interfacebloat # useful with some exclusions at usage of external packages
84+
- intrange # introduced with go 1.22, will simplify the range syntax
9185
- maintidx # useful with some tweeks (better understandable code), maybe use instead "gocyclo", "gocognit" , "cyclop"
86+
- mnd # useful with some exclusions for existing code (e.g. mavlink.go)
9287
- nestif # useful (reduce bugs, simplify code, better understandable code)
9388
- nlreturn # more common style, but could become annoying
9489
- stylecheck # useful with some tweaking (e.g. underscores in names should be allowed - we use it for constants retrieved from C/C++)
@@ -168,6 +163,14 @@ linters-settings:
168163
# Default: false
169164
require-specific: true
170165

166+
perfsprint:
167+
# Optimizes `fmt.Errorf`.
168+
# Default: true
169+
errorf: false
170+
# Optimizes `fmt.Sprintf` with only one argument
171+
# Default: true
172+
sprintf1: false
173+
171174
revive:
172175
rules:
173176
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return

CHANGELOG.md

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
11
# CHANGELOG
22

3-
## [Unreleased](https://github.com/hybridgroup/gobot/compare/v2.3.0...HEAD)
3+
## [Unreleased](https://github.com/hybridgroup/gobot/compare/v2.4.0...HEAD)
4+
5+
## [v2.4.0](https://github.com/hybridgroup/gobot/compare/v2.3.0...v2.4.0) (2024-11-05)
6+
7+
### Bebop
8+
9+
* fix concurrent map writes ([#1063](https://github.com/hybridgroup/gobot/issues/1063))
10+
11+
### Ble
12+
13+
* add support for functional options, add tests ([#1059](https://github.com/hybridgroup/gobot/issues/1059))
14+
* introduce in drivers folder ([#1057](https://github.com/hybridgroup/gobot/issues/1057))
15+
* **client:** add scan timout ([#1051](https://github.com/hybridgroup/gobot/issues/1051))
16+
* **module:** update tinygo.org/x/bluetooth to v0.10 and adapt code ([#1084](https://github.com/hybridgroup/gobot/issues/1084))
17+
18+
### Build
19+
20+
* **go, deps:** switch to Go 1.22 and update modules, linter v1.61.0 and adapt code ([#1093](https://github.com/hybridgroup/gobot/issues/1093),[#1092](https://github.com/hybridgroup/gobot/issues/1092))
21+
* **go, deps:** switch to Go 1.20 and update modules ([#1067](https://github.com/hybridgroup/gobot/issues/1067))
22+
* **linter:** update linter to v1.56.1 and fix issues ([#1068](https://github.com/hybridgroup/gobot/issues/1068))
23+
24+
### Doc
25+
26+
* update links to release or tagged branch ([#1069](https://github.com/hybridgroup/gobot/issues/1069))
27+
* **core:** prepare for release v2.4.0
28+
29+
### Examples
30+
31+
* fix missing checks of return values ([#1060](https://github.com/hybridgroup/gobot/issues/1060))
32+
33+
### Gobot
34+
35+
* rename Master to Manager ([#1070](https://github.com/hybridgroup/gobot/issues/1070))
36+
37+
### Megapi
38+
39+
* use serialport adaptor and move driver to drivers/serial ([#1062](https://github.com/hybridgroup/gobot/issues/1062))
40+
41+
### Neurosky
42+
43+
* use serialport adaptor and move driver to drivers/serial ([#1061](https://github.com/hybridgroup/gobot/issues/1061))
44+
45+
### Test
46+
47+
* try to stabilize eventer tests ([#1066](https://github.com/hybridgroup/gobot/issues/1066))
48+
* try to stabilize firmata tests ([#1097](https://github.com/hybridgroup/gobot/issues/1097))
449

550
## [v2.3.0](https://github.com/hybridgroup/gobot/compare/v2.2.0...v2.3.0) (2024-01-06)
651

@@ -1183,7 +1228,7 @@
11831228

11841229
### core
11851230

1186-
* Add Running() methods for Master and Robot and increase test coverage accordingly
1231+
* Add Running() methods for Manager and Robot and increase test coverage accordingly
11871232

11881233
### sysfs
11891234

@@ -1647,17 +1692,17 @@
16471692
### core
16481693

16491694
* Refactoring to allow 'Metal' development using Gobot packages
1650-
* Able to run robots without being part of a Master.
1695+
* Able to run robots without being part of a Manager.
16511696
* Now running all work in separate goroutines
1652-
* Rename internal name of Master type
1697+
* Rename internal name of Manager type
16531698
* Refactor events to use channels all the way down.
16541699
* Eliminate potential race conditions from Events and Every functions
16551700
* Add Unsubscribe() to Eventer, now Once() works as expected
16561701
* DeleteEvent function added to Eventer interface
16571702
* Ranges over event channels instead of using select
16581703
* No longer return non-standard slices of errors, instead use hashicorp/go-multierror
16591704
* Ensure that all drivers have default names
1660-
* Now both Robot and Master operate using AutoRun as expected
1705+
* Now both Robot and Manager operate using AutoRun as expected
16611706
* Use canonical import domain of gobot.io for all code
16621707
* Use time.Sleep unless waiting for a timeout in a select
16631708
* Uses time.NewTimer() instead of time.After() to be more efficient
@@ -2456,7 +2501,7 @@
24562501
* Replaced ginkgo/gomega with system testing package
24572502
* Refactor gobot/robot/device commands
24582503
* Added Event type
2459-
* Replaced Master type with Gobot type
2504+
* Replaced Manager type with Gobot type
24602505
* Every` and `After` now accept `time.Duration`
24612506
* Removed reflection helper methods
24622507

@@ -2580,7 +2625,7 @@
25802625
* Finalize on SIGINT
25812626
* Publish function for driver events
25822627
* device test coverage
2583-
* master and robot test coverage
2628+
* manager and robot test coverage
25842629

25852630
### Clean
25862631

@@ -2600,7 +2645,7 @@
26002645

26012646
### Refactor
26022647

2603-
* robot and master
2648+
* robot and manager
26042649

26052650
### Remove
26062651

@@ -2636,8 +2681,8 @@
26362681
* Travis banner to README
26372682
* api commands
26382683
* POST command
2639-
* master example
2640-
* robot master
2684+
* manager example
2685+
* robot manager
26412686
* Sphero example
26422687
* Digispark to list of supported platforms
26432688
* helper functions
@@ -2737,11 +2782,11 @@
27372782

27382783
### Rename
27392784

2740-
* Gobot struct to Master
2785+
* Gobot struct to Manager
27412786

27422787
### Set
27432788

2744-
* GOMAXPROCS property in GobotMaster
2789+
* GOMAXPROCS property in GobotManager
27452790

27462791
### Skeleton
27472792

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ Descriptions for each of these will eventually be provided below.
2929

3030
## General Guidelines
3131

32-
* All active development is in the `dev` branch. New or updated features must be added to the `dev` branch. Hotfixes
33-
will be considered on the `master` branch in situations where it does not alter behavior or features, only fixes a bug.
32+
* All active development is in the `dev` branch. New or updated features must be added to the `dev` branch.
3433
* All patches must be provided under the Apache 2.0 License
3534
* Please use the -S option in git to "sign off" that the commit is your work and you are providing it under the
3635
Apache 2.0 License
@@ -142,4 +141,4 @@ Gobot is released with a Contributor Code of Conduct. By participating in this p
142141

143142
## Origins
144143

145-
This document is based on the original [io.js contribution guidelines](https://github.com/nodejs/io.js/blob/master/CONTRIBUTING.md)
144+
This document is based on the original [io.js contribution guidelines](https://github.com/nodejs/io.js/blob/main/CONTRIBUTING.md)

0 commit comments

Comments
 (0)