diff --git a/.golangci.yml b/.golangci.yml index 19bfe20..6a7cf14 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -48,4 +48,8 @@ issues: - ineffassign - staticcheck - errcheck + - path: docs/docs.go + linters: + - forbidigo + diff --git a/cmd/sync/local/sync_local.go b/cmd/sync/local/sync_local.go index 0311ccc..5f3c700 100644 --- a/cmd/sync/local/sync_local.go +++ b/cmd/sync/local/sync_local.go @@ -23,9 +23,9 @@ import ( "k8s.io/test-infra/prow/repoowners" "sigs.k8s.io/yaml" - "github.com/falcosecutity/peribolos-syncer/internal/output" - "github.com/falcosecutity/peribolos-syncer/internal/sync" - orgs "github.com/falcosecutity/peribolos-syncer/pkg/peribolos" + "github.com/falcosecurity/peribolos-syncer/internal/output" + "github.com/falcosecurity/peribolos-syncer/internal/sync" + orgs "github.com/falcosecurity/peribolos-syncer/pkg/peribolos" ) type options struct { @@ -71,7 +71,7 @@ func (o *options) validate() error { return nil } -func (o *options) Run(cmd *cobra.Command, agrs []string) error { +func (o *options) Run(_ *cobra.Command, _ []string) error { if err := o.validate(); err != nil { return errors.Wrap(err, "error validating parameters") } diff --git a/docs/docs.go b/docs/docs.go index d8a4abc..13951a4 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -37,12 +37,14 @@ title: %s var ( filePrepender = func(filename string) string { title := strings.TrimPrefix(strings.TrimSuffix(strings.ReplaceAll(filename, "_", " "), ".md"), fmt.Sprintf("%s/", docsDir)) + return fmt.Sprintf(fileTemplate, title) } linkHandler = func(filename string) string { if filename == cmd.CommandName+".md" { return "_index.md" } + return filename } )