Skip to content
Draft
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
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ permissions:
contents: read

env:
GO_VERSION: '1.23.6'
GO_VERSION: "1.25.4"

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected]
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0
with:
go-version: ${{ env.GO_VERSION }}

Expand All @@ -32,7 +32,7 @@ jobs:
git diff --exit-code go.sum

- name: lint
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea #v6.5.1
uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # ratchet:golangci/[email protected]
with:
version: latest
args: --issues-exit-code=1 --config=.golangci.yml
Expand All @@ -43,20 +43,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected]
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0
with:
go-version: ${{ env.GO_VERSION }}

- name: Build with Goreleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0
with:
distribution: goreleaser
version: '~> v2'
version: "~> v2"
args: release --snapshot --skip publish,archive,sbom,homebrew --clean --config .goreleaser.yaml

ci-windows:
Expand All @@ -65,18 +65,18 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected]
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0
with:
go-version: ${{ env.GO_VERSION }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0
with:
distribution: goreleaser
version: '~> v2'
version: "~> v2"
args: release --snapshot --skip publish,archive,sbom,chocolatey,winget --clean --config .goreleaser-windows.yaml
24 changes: 12 additions & 12 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@ name: goreleaser
on:
push:
tags:
- '*'
- "*"

permissions:
contents: write
packages: write

env:
GO_VERSION: '1.23.6'
GO_VERSION: "1.25.4"

jobs:
goreleaser-linux:
name: goreleaser-linux
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected]
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0
with:
go-version: ${{ env.GO_VERSION }}

- name: Download Syft
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 #v0.18.0
uses: anchore/sbom-action/download-syft@8e94d75ddd33f69f691467e42275782e4bfefe84 # ratchet:anchore/sbom-action/download-syft@v0.20.9

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0
with:
distribution: goreleaser
version: '~> v2'
version: "~> v2"
args: release --clean --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -49,25 +49,25 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/[email protected]
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/[email protected].0
with:
go-version: ${{ env.GO_VERSION }}
- name: Download Syft
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 #v0.18.0
uses: anchore/sbom-action/download-syft@8e94d75ddd33f69f691467e42275782e4bfefe84 # ratchet:anchore/sbom-action/download-syft@v0.20.9

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6.4.0
with:
distribution: goreleaser
version: '~> v2'
version: "~> v2"
args: release --clean --config .goreleaser-windows.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ go.work
bin
dist/

azctx
azctx

.vscode/
AGENTS.md
178 changes: 88 additions & 90 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
version: "2"

run:
tests: true
allow-parallel-runners: true
timeout: 5m

# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
linters:
# Disable all linters.
# Default: false
disable-all: true
# Enable specific linter
default: none
enable:
- asciicheck
- bidichk
Expand All @@ -17,15 +16,12 @@ linters:
- errorlint
- funlen
#- errcheck
- gofmt
- goconst
- gofumpt
- gocyclo
- godox
- gosec
#- gocritic
#- govet
- goimports
- goheader
- misspell
- nolintlint
Expand All @@ -38,97 +34,99 @@ linters:
- unparam
- whitespace
#- nilerr
settings:
dupl:
# Tokens count to trigger issue.
# Default: 150
threshold: 100

linters-settings:
dupl:
# Tokens count to trigger issue.
# Default: 150
threshold: 100

errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors.
# Default: true
asserts: false
errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors.
# Default: true
asserts: false

funlen:
# Checks the number of lines in a function.
# Default: 60
lines: -1
# Default: 40
statements: 50
# Ignore comments when counting lines.
# Default false
ignore-comments: true
funlen:
# Checks the number of lines in a function.
# Default: 60
lines: -1
# Default: 40
statements: 50
# Ignore comments when counting lines.
# Default false
ignore-comments: true

goconst:
# Minimal length of string constant.
# Default: 3
min-len: 2
# Default: 3
min-occurrences: 3
goconst:
# Minimal length of string constant.
# Default: 3
min-len: 2
# Default: 3
min-occurrences: 3

# gocritic:
# enabled-tags:
# - diagnostic
# - experimental
# - opinionated
# - performance
# - style
# disabled-checks:
# - dupImport # https://github.com/go-critic/go-critic/issues/845
# - ifElseChain
# - octalLiteral
# - whyNoLint
# gocritic:
# enabled-tags:
# - diagnostic
# - experimental
# - opinionated
# - performance
# - style
# disabled-checks:
# - dupImport # https://github.com/go-critic/go-critic/issues/845
# - ifElseChain
# - octalLiteral
# - whyNoLint

gocyclo:
# Minimal code complexity to report.
# Default: 30 (but we recommend 10-20)
min-complexity: 15
gocyclo:
# Minimal code complexity to report.
# Default: 30 (but we recommend 10-20)
min-complexity: 15

godox:
keywords:
- FIXME
#- TODO
- FIX
- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-around that should be removed before merging
godox:
keywords:
- FIXME
#- TODO
- FIX
- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-around that should be removed before merging

gofmt:
# Simplify code: gofmt with `-s` option.
# Default: true
simplify: false
# Apply the rewrite rules to the source before reformatting.
# https://pkg.go.dev/cmd/gofmt
# Default: []
rewrite-rules:
# - pattern: 'interface{}'
# replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
# govet:
# enable-all: true
# disable:
# - fieldalignment

goimports:
local-prefixes: github.com/golangci/golangci-lint
misspell:
# Correct spellings using locale preferences for US or UK.
locale: US

# govet:
# enable-all: true
# disable:
# - fieldalignment
nolintlint:
# Disable to ensure that all nolint directives actually have an effect.
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped

misspell:
# Correct spellings using locale preferences for US or UK.
locale: US
# revive:
# rules:
# - name: indent-error-flow
# - name: unexported-return
# disabled: true
# - name: unused-parameter
# - name: unused-receiver
Comment on lines +37 to +113
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The settings key should be nested under linters, not at the same level. The correct structure for golangci-lint v2 is linters.settings not linters as a separate top-level key alongside settings. This configuration may not work as intended.

Copilot uses AI. Check for mistakes.

nolintlint:
# Disable to ensure that all nolint directives actually have an effect.
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped

# revive:
# rules:
# - name: indent-error-flow
# - name: unexported-return
# disabled: true
# - name: unused-parameter
# - name: unused-receiver
formatters:
enable:
- gofmt
- gofumpt
- goimports
settings:
gofmt:
# Simplify code: gofmt with `-s` option.
# Default: true
simplify: false
# Apply the rewrite rules to the source before reformatting.
# https://pkg.go.dev/cmd/gofmt
# Default: []
rewrite-rules:
# - pattern: 'interface{}'
# replacement: 'any'
- pattern: "a[b:len(a)]"
replacement: "a[b:]"
Comment on lines +115 to +132
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatters section is not a standard golangci-lint v2 configuration key. Formatters like gofmt, gofumpt, and goimports should be enabled in the linters.enable section, not in a separate formatters section. This configuration will likely be ignored.

Copilot uses AI. Check for mistakes.
1 change: 0 additions & 1 deletion .goreleaser-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ builds:
- windows
goarch:
- amd64
- arm
- arm64
ldflags:
- -s -w
Expand Down
Loading
Loading