Skip to content
Draft
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches:
- main
paths-ignore:
- 'docs/**'
- 'LICENSES/**'
- '.releases/**'
- '.github/**'
- "docs/**"
- "LICENSES/**"
- ".releases/**"
- ".github/**"
pull_request:

permissions:
Expand All @@ -19,5 +19,5 @@ permissions:

jobs:
check:
uses: openkcm/build/.github/workflows/ci.lib.api.yaml@main
uses: openkcm/build/.github/workflows/ci.lib.yaml@main
secrets: inherit
4 changes: 3 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ linters:
- err113
- exhaustive
- exhaustruct
- exhaustruct_v5
- forbidigo
- funlen
- funcorder
- funlen
- ginkgolinter
- gochecknoglobals
- gochecknoinits
- gocognit
- gocritic
- godot
- godox
- gomodguard # Replaced by gomodguard_v2, enabled with default: all
- gosec
- ireturn
- lll
Expand Down
2 changes: 2 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.exclusions=proto/**,**/*_test.go
sonar.cpd.exclusions=proto/**,**/*_test.go
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fetch-protos:

.PHONY: go-gen
go-gen: clean
@go install ./cmd/protoc-gen-go-eventbuilders
@go install ./cmd/protoc-gen-go-otlpconverters
@find ./proto -type f -iname '*.proto' -exec \
protoc -I./proto -I./vendor-proto \
--go_out=./proto \
Expand All @@ -20,6 +22,16 @@ go-gen: clean
--go-grpc_opt=paths=import \
--go-grpc_opt=module=github.com/openkcm/api-sdk/proto \
{} +
@protoc -I./proto -I./vendor-proto \
--go-eventbuilders_out=./proto \
--go-eventbuilders_opt=paths=import \
--go-eventbuilders_opt=module=github.com/openkcm/api-sdk/proto \
./proto/kms/api/cmk/auditlog/events/v1/events.proto
@protoc -I./proto -I./vendor-proto \
--go-otlpconverters_out=./proto \
--go-otlpconverters_opt=paths=import \
--go-otlpconverters_opt=module=github.com/openkcm/api-sdk/proto \
./proto/kms/api/cmk/auditlog/events/v1/events.proto
@go mod tidy

.PHONY: install-tools
Expand All @@ -28,9 +40,15 @@ install-tools:
go install \
google.golang.org/protobuf/cmd/protoc-gen-go@latest \
google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install ./cmd/protoc-gen-go-eventbuilders
go install ./cmd/protoc-gen-go-otlpconverters
brew install bufbuild/buf/buf
npm install -g @coralogix/protofetch

.PHONY: test
test:
go test -count=1 -race -coverprofile cover.out ./...

.PHONY: validate
validate: format lint breaking

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ includes:
taskfile: hack/common/Taskfile_library.yaml
flatten: true
vars:
CODE_DIRS: ''
CODE_DIRS: "{{.ROOT_DIR}}/cmd/..."
GENERATE_DOCS_INDEX: "false"
Loading
Loading