Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaeta committed Jul 9, 2024
1 parent ecd35b7 commit d907cef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ linters-settings:
linters:
disable-all: true
enable:
- deadcode # Finds unused code
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- gosimple # Linter for Go source code that specializes in simplifying a code
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unused # Checks Go code for unused constants, variables, functions and types
- varcheck # Finds unused global variables and constants
- asasalint # Check for pass []any as any in variadic func(...any)
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
- bidichk # Checks for dangerous unicode character sequences
Expand All @@ -81,7 +79,7 @@ linters:
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
- godot # Check if comments end in a period
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt.
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
# - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
- goprintffuncname # Checks that printf-like functions are named with f at the end
- gosec # Inspects source code for security problems
- nakedret # Finds naked returns in functions greater than a specified function length
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
go.uber.org/zap v1.26.0
)

replace github.com/SSHcom/privx-sdk-go v1.35.0 => ../privx-sdk-go
replace github.com/SSHcom/privx-sdk-go v1.35.0 => github.com/conductorone/privx-sdk-go v0.0.1

require (
filippo.io/age v1.1.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/conductorone/baton-sdk v0.1.20 h1:92jU5zXJ5UMxl6hSEbIdx5t3WzlaLwz/w6AvLNi0+wU=
github.com/conductorone/baton-sdk v0.1.20/go.mod h1:1VMycIep+HU8JXef2wenT3ECzx1w3Jr3KDQG+L6Mv30=
github.com/conductorone/privx-sdk-go v0.0.1 h1:bigz8MEkOuLJ3xJVPvOKEs85WHCH7MdMHbKihq4DLSo=
github.com/conductorone/privx-sdk-go v0.0.1/go.mod h1:8fUcouMBX54uARVPAvYjIgGMPHXZ9T5/qbUFHmjGmSQ=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
7 changes: 1 addition & 6 deletions pkg/connector/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ import (
)

const (
// TODO MARCOS 1.0 are these values going to be used?
RoleMembershipPermanent = "permanent"
RoleMembershipRestricted = "restricted"
RoleMembershipFloating = "floating"
EntitlementAssigned = "assigned"
EntitlementAssigned = "assigned"
)

type roleBuilder struct {
Expand Down Expand Up @@ -71,7 +67,6 @@ func (o *roleBuilder) List(
return roleResources, nextToken, nil, nil
}

// Entitlements always returns an empty slice for users.
func (o *roleBuilder) Entitlements(
_ context.Context,
resource *v2.Resource,
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ filippo.io/edwards25519/field
## explicit; go 1.16
github.com/BurntSushi/toml
github.com/BurntSushi/toml/internal
# github.com/SSHcom/privx-sdk-go v1.35.0 => ../privx-sdk-go
# github.com/SSHcom/privx-sdk-go v1.35.0 => github.com/conductorone/privx-sdk-go v0.0.1
## explicit; go 1.21
github.com/SSHcom/privx-sdk-go/api/auth
github.com/SSHcom/privx-sdk-go/api/rolestore
Expand Down

0 comments on commit d907cef

Please sign in to comment.