Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support of multiple versions by package in the exclude command #15

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'
- name: Run coverage
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
test:
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
go-version: [1.22.x, 1.23.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.54.2
version: v1.61.0

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
88 changes: 13 additions & 75 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,18 @@ linters-settings:
- standard
- prefix(github.com)
- prefix(golang.org)
- prefix(google.golang.org)
- prefix(go.uber.org/mock)

linters:
enable-all: true
disable:
- wsl
- godox
- gomnd
- varnamelen
- wrapcheck
- nonamedreturns
- nlreturn
- goerr113
- ireturn
- exhaustive
- exhaustivestruct
- exhaustruct
- cyclop
- gofumpt
- depguard

issues:
exclude-use-default: false
exclude-rules:
- path: _test\.go
linters:
- gomnd
- gochecknoglobals
- funlen
- dupl
- gosec
- noctx
- forcetypeassert
- containedctx

- path: main\.go
text: "^buildVersion is a global variable"
linters:
- gochecknoglobals
- path: pkg/mod/file\.go
text: "G304: Potential file inclusion via variable"
linters:
- gosec
- path: pkg/mod/file\.go
text: "type assertion must be checked"
linters:
- forcetypeassert
- path: pkg/mod/file\.go
tex: "non-wrapping format verb for fmt.Errorf"
linters:
- errorlint
- path: internal/app/app_test\.go
text: "SA1012: do not pass a nil Context"
linters:
- staticcheck
- path: internal/vcs/http\.go
text: "G402: TLS InsecureSkipVerify set true."
linters:
- gosec
- linters:
- tparallel
text: "subtests should call t.Parallel"
- path: vcs_test\.go
linters:
- paralleltest
- path: pkg/goup/*
linters:
- paralleltest

- linters:
- lll
source: "^//go:generate "

# temporary "fix" waiting for https://github.com/kunwardeep/paralleltest/issues/14.
- linters:
- paralleltest
text: "does not use range value in test Run"
enable:
# Enabled by Default.
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Other requirements
- gci
- revive
31 changes: 28 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
module github.com/rvflash/goup

go 1.14
go 1.22

toolchain go1.23.1

require (
github.com/fatih/color v1.16.0
github.com/go-git/go-git/v5 v5.11.0
github.com/golang/mock v1.7.0-rc.1
github.com/jdxcode/netrc v1.0.0
github.com/matryer/is v1.4.1
github.com/mattn/go-isatty v0.0.20
github.com/rvflash/workr v1.0.0
golang.org/x/mod v0.14.0
go.uber.org/mock v0.4.0
golang.org/x/mod v0.18.0
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading
Loading