forked from viamrobotics/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5185efb
Showing
18 changed files
with
5,766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
gcp.json | ||
*~ | ||
*.# | ||
*# | ||
|
||
# Goland project directory | ||
.idea | ||
|
||
# Frontend ignores | ||
**/node_modules | ||
|
||
# macOS ignores | ||
*.DS_Store | ||
|
||
# gRPC/Protocol Buffers | ||
bin | ||
docs | ||
dist/* | ||
|
||
# exclude files from `ag` search | ||
.ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
service: | ||
golangci-lint-version: 1.43.x | ||
run: | ||
deadline: 600s | ||
skip-dirs: | ||
- genfiles$ | ||
- gen$ | ||
- vendor$ | ||
- test$ | ||
tests: true | ||
linters: | ||
enable-all: true | ||
disable: | ||
- cyclop | ||
- exhaustivestruct | ||
- funlen | ||
- gocognit | ||
- godox | ||
- goerr113 | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- golint | ||
- gomnd | ||
- interfacer | ||
- ireturn | ||
- maligned | ||
- makezero | ||
- nestif | ||
- nlreturn | ||
- paralleltest | ||
- prealloc | ||
- scopelint | ||
- tagliatelle | ||
- testpackage | ||
- varnamelen | ||
- wrapcheck | ||
- wsl | ||
linters-settings: | ||
errcheck: | ||
check-blank: true | ||
gosec: | ||
excludes: | ||
- G601 | ||
gci: | ||
local-prefixes: go.viam.com/api | ||
govet: | ||
enable-all: true | ||
disable: | ||
- fieldalignment | ||
- shadow | ||
lll: | ||
line-length: 140 | ||
issues: | ||
exclude: | ||
- composites | ||
exclude-rules: | ||
- path: _test\.go$|^tests/|^samples/ | ||
linters: | ||
- errcheck | ||
- contextcheck | ||
- exhaustive | ||
- forcetypeassert | ||
- goconst | ||
- gosec | ||
- govet | ||
- noctx | ||
exclude-use-default: false | ||
max-per-linter: 0 | ||
max-same-issues: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
PATH_WITH_TOOLS="`pwd`/bin:`pwd`/frontend/node_modules/.bin:${PATH}" | ||
|
||
setup: | ||
bash etc/setup.sh | ||
|
||
dist/tool-install: Makefile | ||
GOBIN=`pwd`/bin go install google.golang.org/protobuf/cmd/protoc-gen-go \ | ||
github.com/bufbuild/buf/cmd/buf \ | ||
github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking \ | ||
github.com/bufbuild/buf/cmd/protoc-gen-buf-lint \ | ||
github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc \ | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ | ||
github.com/srikrsna/protoc-gen-gotag \ | ||
github.com/edaniels/golinters/cmd/combined \ | ||
github.com/golangci/golangci-lint/cmd/golangci-lint | ||
mkdir -p dist | ||
touch dist/tool-install | ||
|
||
dist/buf: dist/buf-go | ||
|
||
dist/buf-go: dist/tool-install proto/robot/v1/robot.proto proto/tagger/v1/tagger.proto | ||
PATH=$(PATH_WITH_TOOLS) buf lint | ||
PATH=$(PATH_WITH_TOOLS) buf generate | ||
PATH=$(PATH_WITH_TOOLS) buf generate --template ./etc/buf.gen.tag.yaml | ||
touch dist/buf-go | ||
|
||
lint: dist/tool-install | ||
PATH=$(PATH_WITH_TOOLS) buf lint | ||
export pkgs=`go list -f '{{.Dir}}' ./... | grep -v gen | grep -v proto` && echo "$$pkgs" | xargs go vet -vettool=bin/combined | ||
export pkgs=`go list -f '{{.Dir}}' ./... | grep -v gen | grep -v proto` && echo "$$pkgs" | xargs go run github.com/golangci/golangci-lint/cmd/golangci-lint run -v --fix --config=./etc/.golangci.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1beta1 | ||
plugins: | ||
- name: go | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- name: go-grpc | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- name: grpc-gateway | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- generate_unbound_methods=true | ||
- name: doc | ||
out: docs/proto | ||
strategy: all | ||
opt: | ||
- html,index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: v1 | ||
build: | ||
excludes: [node_modules] | ||
lint: | ||
use: | ||
- DEFAULT | ||
breaking: | ||
use: | ||
- FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
service: | ||
golangci-lint-version: 1.43.x | ||
run: | ||
deadline: 600s | ||
skip-dirs: | ||
- genfiles$ | ||
- gen$ | ||
- vendor$ | ||
- test$ | ||
tests: true | ||
linters: | ||
enable-all: true | ||
disable: | ||
- cyclop | ||
- exhaustivestruct | ||
- funlen | ||
- gocognit | ||
- godox | ||
- goerr113 | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- golint | ||
- gomnd | ||
- interfacer | ||
- ireturn | ||
- maligned | ||
- makezero | ||
- nestif | ||
- nlreturn | ||
- paralleltest | ||
- prealloc | ||
- scopelint | ||
- tagliatelle | ||
- testpackage | ||
- varnamelen | ||
- wrapcheck | ||
- wsl | ||
linters-settings: | ||
errcheck: | ||
check-blank: true | ||
gosec: | ||
excludes: | ||
- G601 | ||
gci: | ||
local-prefixes: go.viam.com/api | ||
gomoddirectives: | ||
replace-allow-list: | ||
- github.com/go-acme/lego/v4 | ||
- github.com/pion/ice/v2 | ||
- github.com/grandcat/zeroconf | ||
govet: | ||
enable-all: true | ||
disable: | ||
- fieldalignment | ||
- shadow | ||
lll: | ||
line-length: 140 | ||
issues: | ||
exclude: | ||
- composites | ||
exclude-rules: | ||
- path: _test\.go$|^tests/|^samples/ | ||
linters: | ||
- errcheck | ||
- contextcheck | ||
- exhaustive | ||
- forcetypeassert | ||
- goconst | ||
- gosec | ||
- govet | ||
- noctx | ||
exclude-use-default: false | ||
max-per-linter: 0 | ||
max-same-issues: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: v1beta1 | ||
plugins: | ||
- name: gotag | ||
out: . | ||
opt: | ||
- paths=source_relative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: v1beta1 | ||
plugins: | ||
- name: js | ||
out: dist/js | ||
opt: | ||
- import_style=commonjs | ||
- name: grpc-web | ||
out: dist/js | ||
opt: | ||
- import_style=commonjs | ||
- mode=grpcwebtext | ||
- name: ts | ||
out: dist/js | ||
opt: | ||
- service=grpc-web |
Oops, something went wrong.