Skip to content

Commit

Permalink
feat(goreleaser): bump to 1.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
odsod committed Oct 11, 2022
1 parent de66900 commit 2e62406
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion internal/codegen/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (f *File) Write(p []byte) (int, error) {
if err != nil {
f.err = fmt.Errorf("write: %w", err)
}
return n, err //nolint: wrapcheck // false positive
return n, err //nolint:wrapcheck // false positive
}

// RawContent returns the raw content of the file.
Expand Down
2 changes: 1 addition & 1 deletion sg/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

type cmdEnvCtxKey string

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var cmdEnvKey cmdEnvCtxKey = "cmdEnv"

// ContextWithEnv returns a context with environment variables which are appended to Command.
Expand Down
3 changes: 2 additions & 1 deletion sg/internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
)

// global state for the runner.
//nolint: gochecknoglobals
//
//nolint:gochecknoglobals
var (
mu sync.Mutex
onceFns = map[string]func(context.Context) error{}
Expand Down
10 changes: 5 additions & 5 deletions sgtool/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (s *fileState) downloadBinary(ctx context.Context, url string) (io.ReadClos
}

req.Header = s.httpHeader
//nolint: bodyclose // false positive due to cleanup function
//nolint:bodyclose // false positive due to cleanup function
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, func() {}, fmt.Errorf("download binary %s: %w", url, err)
Expand All @@ -270,7 +270,7 @@ func (s *fileState) extractZip(reader *zip.Reader) ([]string, error) {
}

// Store filename/path for returning and using later on
//nolint: gosec // allow file traversal when extracting archive
//nolint:gosec // allow file traversal when extracting archive
fpath := filepath.Join(s.dstPath, dstName)

// Check for ZipSlip. More Info: http://bit.ly/2MsjAWE
Expand Down Expand Up @@ -298,7 +298,7 @@ func (s *fileState) extractZip(reader *zip.Reader) ([]string, error) {
return filenames, err
}

//nolint: gosec // allow potential decompression bomb
//nolint:gosec // allow potential decompression bomb
_, err = io.Copy(outFile, rc)

// Close the file without defer to close before next iteration of loop
Expand Down Expand Up @@ -332,7 +332,7 @@ func (s *fileState) extractTar(reader io.Reader) error {
dstName = name
}

//nolint: gosec // allow traversal into archive
//nolint:gosec // allow traversal into archive
path := filepath.Join(s.dstPath, dstName)

switch header.Typeflag {
Expand Down Expand Up @@ -360,7 +360,7 @@ func (s *fileState) extractTar(reader io.Reader) error {
if err := os.Chmod(path, 0o775); err != nil {
return fmt.Errorf("extractTar: Chmod() failed: %w", err)
}
//nolint: gosec // allow potential decompression bomb
//nolint:gosec // allow potential decompression bomb
if _, err := io.Copy(outFile, tarReader); err != nil {
return fmt.Errorf("extractTar: Copy() failed: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion tools/sgcommitlint/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const commitlintFileContent = `module.exports = {

const name = "commitlint"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commitlintrc = sg.FromToolsDir("commitlint", ".commitlintrc.js")

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
3 changes: 1 addition & 2 deletions tools/sggolangcilint/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ linters:

# Check whether code was gofumpt-ed.
# [fast: true, auto-fix: true]
# TOOD: Re-enable when it supports updated Go 1.19 GoDoc syntax.
#- gofumpt
- gofumpt

# Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
# [fast: true, auto-fix: false]
Expand Down
2 changes: 1 addition & 1 deletion tools/sggolangmigrate/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
name = "migrate"
)

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sggooglecloudprotoscrubber/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

const version = "1.1.0"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sggoreleaser/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
name = "goreleaser"
version = "1.11.2"
version = "1.11.5"
)

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sggrpcjava/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const version = "1.45.1"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sghadolint/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
// version can be found here: https://github.com/hadolint/hadolint
const version = "2.8.0"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sgmarkdownfmt/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

const version = "75134924a9fd3335f76a9709314c5f5cef4d6ddc"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sgnpmlicense/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// @TODO consider replacing this with https://www.npmjs.com/package/license-checker-rseidelsohn
const (
//nolint: lll
//nolint:lll
banList = "UNLICENCED;GPL-1.0-or-later;LGPL-2.0-or-later;AGPL-3.0;MS-PL;SPL-1.0;CC-BY-NC-1.0;CC-BY-NC-2.0;CC-BY-NC-2.5;CC-BY-NC-4.0;CC-BY-NC-ND-1.0;CC-BY-NC-ND-2.0;CC-BY-NC-ND-2.5;CC-BY-NC-ND-4.0;CC-BY-NC-SA-1.0;CC-BY-NC-SA-2.0;CC-BY-NC-SA-2.5;CC-BY-NC-SA-4.0;EUPL-1.0;EUPL-1.1;EUPL-1.2"
name = "license-checker"
packageJSONContent = `{
Expand Down
2 changes: 1 addition & 1 deletion tools/sgprettier/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const prettierConfigContent = `module.exports = {

const name = "prettier"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var prettierrc = sg.FromToolsDir("prettier", ".prettierrc.js")

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sgprotoc/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

const version = "3.19.5"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down
2 changes: 1 addition & 1 deletion tools/sgprotocgentypescriptaip/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func PrepareCommand(ctx context.Context) error {
if hostArch == sgtool.AMD64 {
hostArch = sgtool.X8664
}
//nolint: lll
//nolint:lll
downloadURL := fmt.Sprintf(
"https://github.com/einride/protoc-gen-typescript-aip/releases/download/v%s/protoc-gen-typescript-aip_%s_%s_%s.tar.gz",
version,
Expand Down
2 changes: 1 addition & 1 deletion tools/sgprotocgentypescripthttp/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func PrepareCommand(ctx context.Context) error {
if hostArch == sgtool.AMD64 {
hostArch = sgtool.X8664
}
//nolint: lll
//nolint:lll
downloadURL := fmt.Sprintf(
"https://github.com/einride/protoc-gen-typescript-http/releases/download/v%s/protoc-gen-typescript-http_%s_%s_%s.tar.gz",
version,
Expand Down
2 changes: 1 addition & 1 deletion tools/sgsops/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

const version = "3.7.1"

//nolint: gochecknoglobals
//nolint:gochecknoglobals
var commandPath string

func Command(ctx context.Context, args ...string) *exec.Cmd {
Expand Down

0 comments on commit 2e62406

Please sign in to comment.