Skip to content

Commit

Permalink
feat(golangci-lint): expose default config
Browse files Browse the repository at this point in the history
Expose the default golangci-lint config to be used by other projects who
want to run the `Command()` but still want to benefit from the default
configuration
  • Loading branch information
alethenorio committed Mar 28, 2022
1 parent 1543186 commit 1789251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/sggolangcilint/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
)

//go:embed golangci.yml
var defaultConfig []byte
var DefaultConfig []byte

func Command(ctx context.Context, args ...string) *exec.Cmd {
sg.Deps(ctx, PrepareCommand)
Expand All @@ -34,7 +34,7 @@ func Run(ctx context.Context, args ...string) error {
if err := os.MkdirAll(filepath.Dir(defaultConfigPath), 0o755); err != nil {
return err
}
if err := os.WriteFile(defaultConfigPath, defaultConfig, 0o600); err != nil {
if err := os.WriteFile(defaultConfigPath, DefaultConfig, 0o600); err != nil {
return err
}
var commands []*exec.Cmd
Expand Down

0 comments on commit 1789251

Please sign in to comment.