Skip to content

Commit

Permalink
Generated content tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Schinkel committed Oct 20, 2022
1 parent 4f983be commit 5153d8a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pkg/override.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func NewOverride(dep *Dependency, ed *Editor) *Override {
LicenseIDs: []string{},
VerifiedBy: ed.String(),
LastVerified: Timestamp()[:10],
Notes: "Your specific notes go here\ne.g. links where you verified a license, etc.",
Notes: "Your dependency-specific notes go here,\n" +
"e.g. links where you read the license you verified, etc.",
}
}
21 changes: 17 additions & 4 deletions pkg/overrides_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,26 @@ package glice

import (
"path/filepath"
"strings"
)

const (
OverridesFilename = "overrides.yaml"
OverridesNotes = "This auto-generated by `glice overrides`.\n" +
"It should be manually edited and vertified before being copied\n" +
"into `glice.yaml` and then committing to version control."

OverridesNotes = "This note is auto-generated by 'glice audit --overrides'.\n" +
"\n" +
"The contents of this YAML file should be manually edited and verified\n" +
"before being copied into 'glice.yaml', this file deleted, then your\n" +
"'glice.yaml' should be committed to your project's Git repo.\n" +
"\n" +
"Also be sure to change any license from 'NOASSERTION' to the correct\n" +
"license upon discovering what this dependency's license actually is.\n" +
"\n" +
"And for other licenses you choose to override that are not in the list\n" +
"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."
)

var _ FilepathGetter = (*OverridesFile)(nil)
Expand All @@ -24,7 +37,7 @@ type OverridesFile struct {
func NewOverridesFile(dir string) *OverridesFile {
pf := &OverridesFile{
Filepath: filepath.Join(dir, OverridesFilename),
Notes: OverridesNotes,
Notes: strings.TrimSpace(OverridesNotes),
}
pf.ensureValidProperties()
return pf
Expand Down

0 comments on commit 5153d8a

Please sign in to comment.