diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa5b99a3..bafffeaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - go: ['1.18'] + go: ['1.21'] env: VERBOSE: 1 GOFLAGS: -mod=readonly @@ -21,17 +21,17 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.45.0 + version: v1.54.0 args: --timeout 5m0s - name: Test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 71b55147..a5af8fd2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,18 +9,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version: 1.21 - name: GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: - version: v1.7.0 + version: v1.20.0 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} - GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} \ No newline at end of file + GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} diff --git a/.github/workflows/spectral.yaml b/.github/workflows/spectral.yaml index 59b6c3f9..b4e32ba0 100644 --- a/.github/workflows/spectral.yaml +++ b/.github/workflows/spectral.yaml @@ -6,10 +6,10 @@ jobs: scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Spectral - uses: spectralops/spectral-github-action@v1 + uses: spectralops/spectral-github-action@v4 with: spectral-dsn: ${{ secrets.SPECTRAL_DSN }} - name: Spectral Scan - run: spectral scan \ No newline at end of file + run: spectral scan diff --git a/main.go b/main.go index 7993aca7..e5d72cd9 100644 --- a/main.go +++ b/main.go @@ -100,7 +100,7 @@ var ( defaultLogLevel = "error" ) -// nolint +//nolint func main() { ctx := kong.Parse(&CLI) diff --git a/pkg/porcelain.go b/pkg/porcelain.go index 44b44272..40a935a5 100644 --- a/pkg/porcelain.go +++ b/pkg/porcelain.go @@ -110,7 +110,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) { for i := range entries { v := entries[i] - ep := ellipsis.Shorten(v.ResolvedPath, 30) // nolint: gomnd + ep := ellipsis.Shorten(v.ResolvedPath, 30) //nolint: gomnd if !v.IsFound { fmt.Fprintf(&buf, "[%s %s %s] %s\n", yellow(v.ProviderName), gray(ep), red("missing"), green(v.Key)) } else { @@ -123,7 +123,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) { fmt.Fprint(p.Out, out) } func maskedValue(v string) string { - return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) // nolint: gomnd + return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) //nolint: gomnd } func (p *Porcelain) PrintMatches(matches []core.Match) { diff --git a/pkg/providers/heroku.go b/pkg/providers/heroku.go index c27d7c9b..a6dc8dc8 100644 --- a/pkg/providers/heroku.go +++ b/pkg/providers/heroku.go @@ -90,7 +90,7 @@ func (h *Heroku) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) { return entries, nil } -func (h *Heroku) Get(p core.KeyPath) (*core.EnvEntry, error) { // nolint:dupl +func (h *Heroku) Get(p core.KeyPath) (*core.EnvEntry, error) { //nolint:dupl secret, err := h.getSecret(p) if err != nil { return nil, err diff --git a/pkg/providers/keypass.go b/pkg/providers/keypass.go index e8a8a766..d82e5b12 100644 --- a/pkg/providers/keypass.go +++ b/pkg/providers/keypass.go @@ -24,7 +24,7 @@ type KeyPass struct { const KeyPassName = "KeyPass" -// nolint +//nolint func init() { metaInfo := core.MetaInfo{ Description: "Keypass", diff --git a/pkg/providers/lastpass.go b/pkg/providers/lastpass.go index 53608a94..63afafde 100644 --- a/pkg/providers/lastpass.go +++ b/pkg/providers/lastpass.go @@ -148,7 +148,7 @@ func (l *LastPass) notesToMap(notes string) map[string]string { results := map[string]string{} scanner := bufio.NewScanner(strings.NewReader(notes)) for scanner.Scan() { - findings := strings.SplitN(scanner.Text(), ":", 2) // nolint: gomnd + findings := strings.SplitN(scanner.Text(), ":", 2) //nolint: gomnd if len(findings) == findingNoteCount { results[strings.TrimSpace(findings[0])] = strings.TrimSpace(findings[1]) } @@ -161,7 +161,7 @@ func (l *LastPass) getNodeByKeyName(key, notes string) (string, error) { scanner := bufio.NewScanner(strings.NewReader(notes)) for scanner.Scan() { - findings := strings.SplitN(scanner.Text(), ":", 2) // nolint: gomnd + findings := strings.SplitN(scanner.Text(), ":", 2) //nolint: gomnd if len(findings) == findingNoteCount && findings[0] == key { return strings.TrimSpace(findings[1]), nil } diff --git a/pkg/providers/process_env.go b/pkg/providers/process_env.go index d0e26ed9..66a57475 100644 --- a/pkg/providers/process_env.go +++ b/pkg/providers/process_env.go @@ -52,7 +52,7 @@ func (a *ProcessEnv) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) { kvs := make(map[string]string) for _, envs := range os.Environ() { - pair := strings.SplitN(envs, "=", 2) // nolint: gomnd + pair := strings.SplitN(envs, "=", 2) //nolint: gomnd kvs[pair[0]] = pair[1] } var entries []core.EnvEntry diff --git a/pkg/providers/vercel.go b/pkg/providers/vercel.go index 22da7346..80b80291 100644 --- a/pkg/providers/vercel.go +++ b/pkg/providers/vercel.go @@ -119,7 +119,7 @@ func (ve *Vercel) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) { return entries, nil } -func (ve *Vercel) Get(p core.KeyPath) (*core.EnvEntry, error) { // nolint:dupl +func (ve *Vercel) Get(p core.KeyPath) (*core.EnvEntry, error) { //nolint:dupl secret, err := ve.getSecret(p) if err != nil { return nil, err diff --git a/pkg/teller_test.go b/pkg/teller_test.go index 668da37f..33073e4f 100644 --- a/pkg/teller_test.go +++ b/pkg/teller_test.go @@ -75,7 +75,7 @@ func (im *InMemProvider) Meta() core.MetaInfo { return core.MetaInfo{} } -// nolint +//nolint func init() { inmemProviderMeta := core.MetaInfo{ Name: "inmem-provider",