Skip to content

Commit

Permalink
feat: remove allow list, generate everything
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov committed Mar 21, 2024
1 parent cc67f1b commit d08be80
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 353 deletions.
157 changes: 0 additions & 157 deletions internal/filter/filter.go

This file was deleted.

171 changes: 0 additions & 171 deletions internal/filter/filter_test.go

This file was deleted.

29 changes: 5 additions & 24 deletions internal/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"golang.org/x/sync/errgroup"

"github.com/aiven/go-api-schemas/internal/convert"
"github.com/aiven/go-api-schemas/internal/filter"
"github.com/aiven/go-api-schemas/internal/pkg/types"
"github.com/aiven/go-api-schemas/internal/pkg/util"
)
Expand Down Expand Up @@ -40,14 +39,8 @@ func serviceTypes() error {
return err
}

filtered, err := filter.ServiceTypes(r)
if err != nil {
return err
}

out := map[string]types.UserConfigSchema{}

for k, v := range filtered {
for k, v := range r {

Check failure on line 43 in internal/gen/gen.go

View workflow job for this annotation

GitHub Actions / Trunk Check

golangci-lint(wsl)

[new] ranges should only be cuddled with assignments used in the iteration
cv, err := convert.UserConfigSchema(v.UserConfigSchema)
if err != nil {
return err
Expand All @@ -72,14 +65,8 @@ func integrationTypes() error {
return err
}

filtered, err := filter.IntegrationTypes(r)
if err != nil {
return err
}

out := map[string]types.UserConfigSchema{}

for _, v := range filtered {
out := make(map[string]types.UserConfigSchema, len(r))
for _, v := range r {

Check failure on line 69 in internal/gen/gen.go

View workflow job for this annotation

GitHub Actions / Trunk Check

golangci-lint(wsl)

[new] ranges should only be cuddled with assignments used in the iteration
cv, err := convert.UserConfigSchema(v.UserConfigSchema)
if err != nil {
return err
Expand All @@ -104,14 +91,8 @@ func integrationEndpointTypes() error {
return err
}

filtered, err := filter.IntegrationEndpointTypes(r)
if err != nil {
return err
}

out := map[string]types.UserConfigSchema{}

for _, v := range filtered {
out := make(map[string]types.UserConfigSchema, len(r))
for _, v := range r {

Check failure on line 95 in internal/gen/gen.go

View workflow job for this annotation

GitHub Actions / Trunk Check

golangci-lint(wsl)

[new] ranges should only be cuddled with assignments used in the iteration
cv, err := convert.UserConfigSchema(v.UserConfigSchema)
if err != nil {
return err
Expand Down
Loading

0 comments on commit d08be80

Please sign in to comment.