Skip to content

Commit

Permalink
Fixed verifier for dependencies (was refernce, s/b alias), take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Schinkel committed Oct 20, 2022
1 parent 7ce1d15 commit ace8078
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
27 changes: 16 additions & 11 deletions pkg/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ func (em EditorMap) ToEditors() Editors {
return editors
}

func (e *Editor) Alias() string {
return fmt.Sprintf("*%s", e.Reference)
}

func (e *Editor) String() string {
if e.Reference == "" {
e.Reference = UpToN(e.Email, '@', 1)
}
return fmt.Sprintf("&%s %s <%s>", e.Reference, e.Name, e.Email)
}

func (e *Editor) MarshalYAML() (interface{}, error) {
return e.String(), nil
}
Expand Down Expand Up @@ -92,3 +81,19 @@ end:
}
return err
}

func (e *Editor) Alias() string {
e.ensureReference()
return fmt.Sprintf("*%s", e.Reference)
}

func (e *Editor) String() string {
e.ensureReference()
return fmt.Sprintf("&%s %s <%s>", e.Reference, e.Name, e.Email)
}

func (e *Editor) ensureReference() {
if e.Reference == "" {
e.Reference = UpToN(e.Email, '@', 1)
}
}
2 changes: 1 addition & 1 deletion pkg/overrides_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
"of allowed licenses se sure to include a note for the dependency about\n" +
"why you are overriding license compliance, and also if you plan for\n" +
"the override to just be TEMPORARY, and if so be sure to specify the\n" +
"criteria to be satisfied before the override can be removed\n."
"criteria to be satisfied before the override can be removed.\n"
)

var _ FilepathGetter = (*OverridesFile)(nil)
Expand Down

0 comments on commit ace8078

Please sign in to comment.