Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
77e6c5e
Update dependencies
carabasdaniel Apr 10, 2025
7b179a1
Fix sdk linting issues
carabasdaniel Apr 11, 2025
bd76d0e
Fix linting for openapi, okta and ldap plugins
carabasdaniel Apr 11, 2025
fbfa2de
Fix linting in jumpcloud, google and fusionauth plugins
carabasdaniel Apr 14, 2025
2336137
Fix linting for azuread, azuredb2c and cognito plugins
carabasdaniel Apr 14, 2025
27587c4
Fix auth0 and cli linting errors
carabasdaniel Apr 14, 2025
8ba9f1c
Update ci go linter and go releaser versions
carabasdaniel Apr 14, 2025
11440b6
Use linting rules from topaz and update formatting with gofumpt
carabasdaniel Apr 15, 2025
fdba13a
Update error messages and address review comments
carabasdaniel Apr 15, 2025
7c4eece
Merge commit 'f46d21fedde94c6732608fab3845d95f60d09e77' into updates
carabasdaniel Apr 15, 2025
1363ce7
Update cognito fetch groups func
carabasdaniel Apr 15, 2025
f20611d
Update azuread plugin fetcher
carabasdaniel Apr 16, 2025
b3320c7
Update azureadb2c fetcher
carabasdaniel Apr 16, 2025
ba5768e
Update google and azure plugin fetchers
carabasdaniel Apr 17, 2025
cd92aed
Update auth0 plugin fetcher and httpclient
carabasdaniel Apr 22, 2025
9e30c50
Add fetcher helpers to sdk
carabasdaniel Apr 23, 2025
4ac7be3
Remove BASE_DIR from makefile
carabasdaniel Apr 23, 2025
69c5807
Address review comments
carabasdaniel Apr 24, 2025
0170d18
Fix generic fetcher map yield helper
carabasdaniel Apr 24, 2025
ebcb245
Create a custom error writer in sdk
carabasdaniel Apr 25, 2025
ea1a067
Update error writer
carabasdaniel Apr 29, 2025
670337f
ErrorWriter embeds an io.Writer
ronenh Apr 30, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ env:
VAULT_ADDR: https://vault.eng.aserto.com/
PRE_RELEASE: ${{ github.ref == 'refs/heads/main' && 'main' || '' }}
GO_VERSION: "1.24"
GO_RELEASER_VERSION: "v2.3.2"
GO_LANGCI_LINT_VERSION: "v1.64.5"
GO_RELEASER_VERSION: "v2.8.2"
GO_LANGCI_LINT_VERSION: "v2.0.2"
GO_TESTSUM_VERSION: "1.11.0"

jobs:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
-
name: Lint package ${{ matrix.package }}
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: ${{ env.GO_LANGCI_LINT_VERSION }}
install-mode: binary
Expand Down
185 changes: 74 additions & 111 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,120 +1,83 @@
---
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration

linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 80
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:
min-complexity: 18
goimports:
local-prefixes: github.com/golangci/golangci-lint
govet:
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
misspell:
locale: US
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
version: "2"

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- asciicheck
- bodyclose
- dogsled
default: all

# explicitly disabled linters
disable:
- containedctx
- contextcheck
- cyclop
- depguard
- errcheck
- copyloopvar
- exhaustruct
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- err113
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- noctx
- rowserrcheck
- staticcheck
- stylecheck
- testpackage
- typecheck
- unconvert
- unparam
- unused
- forbidigo
- gomodguard # no go.mod at root level
- gochecknoglobals # no configuration options
- nilnil
- nlreturn # redundant with wsl
- paralleltest
- revive
- tagalign
- thelper
- varnamelen
- wrapcheck

settings:
cyclop:
max-complexity: 12

errcheck:
exclude-functions:
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
- os.Close

funlen:
lines: 80
statements: 60
ignore-comments: true

gomoddirectives:
replace-local: true

# don't enable:
# - depguard
# - dupl
# - gochecknoglobals
# - gocognit
# - godox
# - gomnd
# - lll
# - nestif
# - nolintlint # conflict with 1.19 gofmt changes
# - prealloc
# - revive
# - wsl
# - whitespace
gosec:
excludes:
- G104 # Errors unhandled
- G304 # Potential file inclusion via variable (see https://github.com/golang/go/issues/67002)

issues:
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- declaration of "(err|ctx)" shadows declaration at
- shadow of imported from 'github.com/stretchr/testify/assert' package 'assert'
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
linters:
- gomnd
# https://github.com/go-critic/go-critic/issues/926
- text: "unnecessaryDefer:"
linters:
- gocritic
- text: "unnamedResult:"
linters:
- gocritic
- text: "G404"
linters:
- gosec
ireturn:
allow:
- error
- empty
- stdlib
- generic
- proto.Message
- v3.ImporterClient

lll:
line-length: 150

recvcheck:
exclusions:
- "*.Map"

tagliatelle:
case:
rules:
json: snake
yaml: snake

exclusions:
generated: lax

formatters:
enable:
- gofmt
- gofumpt
- goimports
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ builds:

archives:
# https://goreleaser.com/customization/archive/
- format: zip
- formats:
- zip
files:
- LICENSE
- README.md
Expand Down
5 changes: 3 additions & 2 deletions cli/cmd/ds-load/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"os"
"strings"

Expand All @@ -18,13 +19,13 @@ func main() {

pluginFinder, err := plugin.NewHomeDirFinder(true)
if err != nil {
os.Stderr.WriteString(err.Error())
_, _ = fmt.Fprint(os.Stderr, err)
os.Exit(1)
}

plugins, err := pluginFinder.Find()
if err != nil {
os.Stderr.WriteString(err.Error())
_, _ = fmt.Fprint(os.Stderr, err)
os.Exit(1)
}

Expand Down
40 changes: 20 additions & 20 deletions cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ toolchain go1.24.1
replace github.com/aserto-dev/ds-load/sdk => ../sdk

require (
github.com/alecthomas/kong v1.8.1
github.com/aserto-dev/ds-load/sdk v0.0.0-00010101000000-000000000000
github.com/aserto-dev/go-aserto v0.33.7
github.com/aserto-dev/go-directory v0.33.7
github.com/fullstorydev/grpcurl v1.9.2
github.com/alecthomas/kong v1.10.0
github.com/aserto-dev/ds-load/sdk v0.0.0-20250408143332-e8965667fcc0
github.com/aserto-dev/go-aserto v0.33.8
github.com/aserto-dev/go-directory v0.33.10
github.com/fullstorydev/grpcurl v1.9.3
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.33.0
github.com/rs/zerolog v1.34.0
github.com/stretchr/testify v1.10.0
golang.org/x/sync v0.12.0
google.golang.org/grpc v1.71.0
golang.org/x/sync v0.13.0
google.golang.org/grpc v1.71.1
)

require (
github.com/aserto-dev/errors v0.0.15 // indirect
github.com/aserto-dev/header v0.0.10 // indirect
github.com/aserto-dev/logger v0.0.7 // indirect
github.com/bufbuild/protocompile v0.10.0 // indirect
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
github.com/aserto-dev/errors v0.0.17 // indirect
github.com/aserto-dev/header v0.0.11 // indirect
github.com/aserto-dev/logger v0.0.9 // indirect
github.com/bufbuild/protocompile v0.14.1 // indirect
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
Expand All @@ -35,17 +35,17 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/jhump/protoreflect v1.16.0 // indirect
github.com/jhump/protoreflect v1.17.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/samber/lo v1.49.1 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/protobuf v1.36.5 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250409194420-de1ac958c67a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250409194420-de1ac958c67a // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading