Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local-prefixes in golangci.yaml #176

Merged
merged 1 commit into from
Oct 12, 2023
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
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ run:

linters-settings:
goimports:
local-prefixes: go.hollow.sh/serverservice
local-prefixes: go.infratographer.com/permissions-api
gofumpt:
extra-rules: true

Expand Down
5 changes: 3 additions & 2 deletions cmd/createrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.infratographer.com/x/gidx"
"go.infratographer.com/x/viperx"

"go.infratographer.com/permissions-api/internal/config"
"go.infratographer.com/permissions-api/internal/iapl"
"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/spicedbx"
"go.infratographer.com/x/gidx"
"go.infratographer.com/x/viperx"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion cmd/schema_mermaid.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"os"
"text/template"

"go.infratographer.com/permissions-api/internal/iapl"
"gopkg.in/yaml.v3"

"go.infratographer.com/permissions-api/internal/iapl"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion internal/api/assignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package api
import (
"net/http"

"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/internal/types"

"github.com/labstack/echo/v4"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
Expand Down
5 changes: 3 additions & 2 deletions internal/api/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"time"

"github.com/labstack/echo/v4"
"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/gidx"
"go.opentelemetry.io/otel/codes"
"go.uber.org/multierr"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions internal/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"net/http"

"github.com/labstack/echo/v4"
"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/echojwtx"
"go.infratographer.com/x/gidx"
"go.opentelemetry.io/otel"
"go.uber.org/zap"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
)

var tracer = otel.Tracer("go.infratographer.com/permissions-api/internal/api")
Expand Down
1 change: 1 addition & 0 deletions internal/iapl/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"go.infratographer.com/permissions-api/internal/types"

"gopkg.in/yaml.v3"
)

Expand Down
1 change: 1 addition & 0 deletions internal/iapl/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/require"

"go.infratographer.com/permissions-api/internal/testingx"
)

Expand Down
5 changes: 3 additions & 2 deletions internal/pubsub/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ import (
"sync"
"time"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/events"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
"go.uber.org/multierr"
"go.uber.org/zap"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/types"
)

const nakDelay = 10 * time.Second
Expand Down
7 changes: 4 additions & 3 deletions internal/pubsub/subscriber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"testing"
"time"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/query/mock"
"go.infratographer.com/permissions-api/internal/testingx"
"go.infratographer.com/x/events"
"go.infratographer.com/x/gidx"
"go.infratographer.com/x/testing/eventtools"

"go.infratographer.com/permissions-api/internal/query"
"go.infratographer.com/permissions-api/internal/query/mock"
"go.infratographer.com/permissions-api/internal/testingx"

"github.com/stretchr/testify/require"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/query/relations.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"strings"

pb "github.com/authzed/authzed-go/proto/authzed/api/v1"
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/gidx"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
"go.uber.org/multierr"

"go.infratographer.com/permissions-api/internal/types"
)

var roleSubjectRelation = "subject"
Expand Down
3 changes: 2 additions & 1 deletion internal/query/relations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/internal/iapl"
"go.infratographer.com/permissions-api/internal/spicedbx"
"go.infratographer.com/permissions-api/internal/testingx"
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/gidx"
)

func testEngine(ctx context.Context, t *testing.T, namespace string) Engine {
Expand Down
3 changes: 2 additions & 1 deletion internal/query/roles.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package query

import (
"go.infratographer.com/permissions-api/internal/types"
"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/internal/types"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/permissions/mockpermissions/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"context"

"github.com/stretchr/testify/mock"
"go.infratographer.com/permissions-api/pkg/permissions"
"go.infratographer.com/x/events"
"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/pkg/permissions"
)

var _ permissions.AuthRelationshipRequestHandler = (*MockPermissions)(nil)
Expand Down
5 changes: 3 additions & 2 deletions pkg/permissions/mockpermissions/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"testing"

"github.com/stretchr/testify/require"
"go.infratographer.com/permissions-api/pkg/permissions"
"go.infratographer.com/permissions-api/pkg/permissions/mockpermissions"
"go.infratographer.com/x/events"
"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/pkg/permissions"
"go.infratographer.com/permissions-api/pkg/permissions/mockpermissions"
)

func TestPermissions(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/permissions/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (

"github.com/labstack/echo/v4"
"github.com/stretchr/testify/require"
"go.infratographer.com/permissions-api/pkg/permissions"
"go.infratographer.com/x/echojwtx"
"go.infratographer.com/x/gidx"

"go.infratographer.com/permissions-api/pkg/permissions"
)

func TestPermissions(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/permissions/relationships_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (

"github.com/labstack/echo/v4"
"github.com/stretchr/testify/require"
"go.infratographer.com/permissions-api/pkg/permissions"
"go.infratographer.com/x/events"
"go.infratographer.com/x/gidx"
"go.infratographer.com/x/testing/eventtools"

"go.infratographer.com/permissions-api/pkg/permissions"
)

func TestMiddlewareMissing(t *testing.T) {
Expand Down
Loading