Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
quality-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.23
uses: actions/setup-go@v7

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: viamrobotics/build-action@v1
with:
# note: you can replace this line with 'version: ""' if
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/license_finder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
steps:
- name: Check out code
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Check out PR branch code
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ $(MODULE_BINARY): Makefile go.mod *.go cmd/module/*.go
tool-install:
GOBIN=`pwd`/$(TOOL_BIN) go install \
github.com/edaniels/golinters/cmd/combined \
github.com/golangci/golangci-lint/cmd/golangci-lint \
github.com/AlekSi/gocov-xml \
github.com/axw/gocov/gocov \
gotest.tools/gotestsum \
Expand All @@ -26,10 +25,12 @@ tool-install:
lint: lint-go
PATH=$(TOOL_BIN) actionlint

GOVERSION = $(shell grep '^go .\..' go.mod | head -n1 | cut -d' ' -f2)

lint-go: tool-install
go mod tidy
export pkgs="`go list -f '{{.Dir}}' ./... | grep -v /proto/`" && echo "$$pkgs" | xargs go vet -vettool=$(TOOL_BIN)/combined
GOGC=50 $(TOOL_BIN)/golangci-lint run -v --fix --config=./etc/golangci.yaml
GOGC=50 GOTOOLCHAIN=go$(GOVERSION) go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run -v --fix --config=./etc/golangci.yaml

update:
go get go.viam.com/rdk@latest
Expand Down
10 changes: 5 additions & 5 deletions configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ type SCBConfig struct {
}

// Validate validates all parts of the sensor controlled base config.
func (cfg *SCBConfig) Validate(path string) ([]string, error) {
func (cfg *SCBConfig) Validate(path string) ([]string, []string, error) {
deps := []string{}
if len(cfg.MovementSensor) == 0 {
return nil, resource.NewConfigValidationError(path, errors.New("need at least one movement sensor for base"))
return nil, nil, resource.NewConfigValidationError(path, errors.New("need at least one movement sensor for base"))
}
deps = append(deps, cfg.MovementSensor...)

if cfg.Base == "" {
return nil, resource.NewConfigValidationFieldRequiredError(path, "base")
return nil, nil, resource.NewConfigValidationFieldRequiredError(path, "base")
}
deps = append(deps, cfg.Base)

for _, pidConf := range cfg.ControlParameters {
if pidConf.Type != typeLinVel && pidConf.Type != typeAngVel {
return nil, resource.NewConfigValidationError(path,
return nil, nil, resource.NewConfigValidationError(path,
errors.New("control_parameters type must be 'linear_velocity' or 'angular_velocity'"))
}
}

return deps, nil
return deps, nil, nil
}
23 changes: 22 additions & 1 deletion doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
- - :permit
- MIT
Expand Down Expand Up @@ -167,3 +166,25 @@
:why:
:versions: []
:when: 2025-04-10 15:21:04.946556000 Z
- - :permit
- Mozilla Public License 2.0
- :who:
:why:
:versions: []
:when: 2026-08-20 16:30:07.564512536 Z
- - :approve
- codeberg.org/go-fonts/liberation
- &1
:who:
:why:
:versions: []
:when: 2026-08-20 16:30:07.802606141 Z
- - :approve
- codeberg.org/go-latex/latex
- *1
- - :approve
- github.com/hashicorp/go-getter
- *1
- - :approve
- github.com/hashicorp/go-version
- *1
Loading
Loading