Skip to content

Commit

Permalink
refactor: fix golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jan 9, 2025
1 parent 153d5f6 commit 84f0615
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions internal/core/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func (b *Blueprint) Apply(f *File) ([]ScopedValues, error) {
}

for _, s := range b.Steps {
selected, err := dasel.Select(value, s.Operation)
if err != nil {
return found, err
selected, verr := dasel.Select(value, s.Operation)
if verr != nil {
return found, verr
}

values := []string{}
Expand Down
2 changes: 1 addition & 1 deletion internal/core/ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var syntaxOpts = map[string]func(string, *ini.Section, *Config) error{
cfg.FormatToLang[label] = sec.Key("Lang").String()
return nil
},
"Blueprint": func(label string, sec *ini.Section, cfg *Config) error { //nolint:unparam
"Blueprint": func(label string, sec *ini.Section, cfg *Config) error {
name := sec.Key("Blueprint").String()

path := FindConfigAsset(cfg, name+".yml", BlueprintsDir)
Expand Down
6 changes: 3 additions & 3 deletions internal/lint/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ func (l *Linter) lintData(f *core.File) error {
if err != nil {
return err
} else if sec.Match(f.Path) {
found, err := blueprint.Apply(f)
if err != nil {
found, berr := blueprint.Apply(f)
if berr != nil {
return core.NewE201FromTarget(
err.Error(),
berr.Error(),
fmt.Sprintf("Blueprint = %s", blueprint),
l.Manager.Config.RootINI,
)
Expand Down

0 comments on commit 84f0615

Please sign in to comment.