Skip to content

Commit

Permalink
feat(example): add GoLicenses target to example
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Oct 13, 2022
1 parent 97c2a13 commit 0e369f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example/.sage/main.go
Expand Up @@ -8,6 +8,7 @@ import (
"go.einride.tech/sage/tools/sggit"
"go.einride.tech/sage/tools/sggo"
"go.einride.tech/sage/tools/sggolangcilint"
"go.einride.tech/sage/tools/sggolicenses"
"go.einride.tech/sage/tools/sggoreview"
"go.einride.tech/sage/tools/sgmarkdownfmt"
"go.einride.tech/sage/tools/sgyamlfmt"
Expand All @@ -26,7 +27,8 @@ func Default(ctx context.Context) error {
sg.Deps(ctx, ConvcoCheck, FormatMarkdown, FormatYaml)
sg.Deps(ctx, GoLint, GoReview)
sg.Deps(ctx, GoTest)
sg.SerialDeps(ctx, GoModTidy, GitVerifyNoDiff)
sg.Deps(ctx, GoModTidy)
sg.Deps(ctx, GoLicenses, GitVerifyNoDiff)
return nil
}

Expand All @@ -50,6 +52,11 @@ func GoLint(ctx context.Context) error {
return sggolangcilint.Run(ctx)
}

func GoLicenses(ctx context.Context) error {
sg.Logger(ctx).Println("checking Go licenses...")
return sggolicenses.Check(ctx)
}

func FormatMarkdown(ctx context.Context) error {
sg.Logger(ctx).Println("formatting Markdown files...")
return sgmarkdownfmt.Command(ctx, "-w", ".").Run()
Expand Down

0 comments on commit 0e369f1

Please sign in to comment.