Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Nov 17, 2023
1 parent 6a99b99 commit 6b1a86b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions cmd/controller_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/zapier/kubechecks/pkg"
"github.com/zapier/kubechecks/pkg/config"
"github.com/zapier/kubechecks/pkg/events"
Expand Down
1 change: 1 addition & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/spf13/cobra"

"github.com/zapier/kubechecks/pkg"
)

Expand Down
1 change: 1 addition & 0 deletions hacks/env-to-docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/zapier/kubechecks/cmd"
)

Expand Down
16 changes: 6 additions & 10 deletions pkg/affected_apps/best_effort.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ import (
"strings"

"github.com/rs/zerolog/log"

"github.com/zapier/kubechecks/pkg/config"
)

// TODO: move this out to config and or in an .kubechecks.yaml as well
var (
HelmPath = []string{"apps/", "argocd/", "charts/", "manifests/"}
HelmFileTypes = []string{".yaml", ".yml", ".tpl"}
KustomizeSubPaths = []string{"base/", "bases/", "components/", "overlays/", "resources/"}
)
var KustomizeSubPaths = []string{"base/", "bases/", "components/", "overlays/", "resources/"}

type BestEffort struct {
repoName string
Expand All @@ -29,7 +25,7 @@ func NewBestEffortMatcher(repoName string, repoFileList []string) *BestEffort {
}
}

func (b *BestEffort) AffectedApps(ctx context.Context, changeList []string) (AffectedItems, error) {
func (b *BestEffort) AffectedApps(_ context.Context, changeList []string) (AffectedItems, error) {
appsMap := make(map[string]string)

for _, file := range changeList {
Expand Down Expand Up @@ -115,9 +111,9 @@ func isKustomizeApp(file string) bool {

func isKustomizeBaseComponentsChange(file string) bool {
return strings.Contains(file, "base/") ||
strings.Contains(file, "bases/") ||
strings.Contains(file, "components/") ||
strings.Contains(file, "resources/")
strings.Contains(file, "bases/") ||
strings.Contains(file, "components/") ||
strings.Contains(file, "resources/")
}

func overlaysDir(file string) string {
Expand Down

0 comments on commit 6b1a86b

Please sign in to comment.