Skip to content

Commit

Permalink
Add goprintffuncname linter and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JAORMX committed Nov 21, 2023
1 parent 242cd31 commit d7f6d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ linters:
- gochecknoglobals
- gochecknoinits
- gochecksumtype
- goprintffuncname

issues:
exclude-use-default: false
Expand Down
6 changes: 3 additions & 3 deletions cmd/ghactions/replacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (r *replacer) do(ctx context.Context, cmd *cobra.Command) error {
modified := false

err := ghactions.TraverseGitHubActionWorkflows(bfs, base, func(path string, wflow *yaml.Node) error {
r.log(cmd, "Processing %s\n", path)
r.logf(cmd, "Processing %s\n", path)
m, err := ghactions.ModifyReferencesInYAML(ctx, r.ghcli, wflow)
if err != nil {
return fmt.Errorf("failed to process YAML file %s: %w", path, err)
Expand All @@ -64,7 +64,7 @@ func (r *replacer) do(ctx context.Context, cmd *cobra.Command) error {
}

if m {
r.log(cmd, "Modified %s\n", path)
r.logf(cmd, "Modified %s\n", path)
outfiles[path] = buf.String()
}

Expand All @@ -85,7 +85,7 @@ func (r *replacer) do(ctx context.Context, cmd *cobra.Command) error {
return nil
}

func (r *replacer) log(cmd *cobra.Command, format string, args ...interface{}) {
func (r *replacer) logf(cmd *cobra.Command, format string, args ...interface{}) {
if !r.quiet {
fmt.Fprintf(cmd.ErrOrStderr(), format, args...)
}
Expand Down

0 comments on commit d7f6d9f

Please sign in to comment.