Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
32 changes: 13 additions & 19 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: "2"

run:
timeout: 10m

Expand All @@ -6,26 +8,29 @@ linters:
enable:
- bodyclose
- copyloopvar
- depguard
# - depguard # Disabled - no import restrictions applied earlier
- dogsled
- errcheck
- goconst
- gocritic
- gofumpt
- goimports
- gosimple
# - gosimple # Merged into staticcheck in v2
- govet
- ineffassign
- misspell
- nakedret
- nestif
- nolintlint
- staticcheck
# - stylecheck # Disable stylecheck until refactor
- typecheck
# - stylecheck # Merged into staticcheck in v2
# - typecheck # Removed in v2
- unconvert
- unused

formatters:
enable:
- gofumpt
- goimports


linters-settings:
dogsled:
Expand All @@ -40,17 +45,14 @@ linters-settings:
disabled-checks:
- regexpMust
- badCall # Remove this after CI workflow PR

gofumpt:
lang-version: "1.24"

misspell:
ignore-words:
- cheqd
- cheq
- ncheq

stylecheck:
staticcheck:
# Select the Go version to target.
go: "1.24"
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
Expand All @@ -63,15 +65,7 @@ linters-settings:
# https://staticcheck.io/docs/configuration/options/#initialisms
initialisms: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"]

depguard:
rules:
main:
files:
- $all
list-mode: lax
allow: "*"

goconst:
min-occurrences: 5
ignore-tests: true
ignore-strings: "echo '"
ignore-strings: "echo '"
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
Expand All @@ -27,7 +27,7 @@ jobs:
args: build --clean --snapshot --single-target

- name: Store artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: cheqd-noded
path: dist/did-resolver_linux_amd64_v1/did-resolver
Expand All @@ -40,7 +40,7 @@ jobs:
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
cache-to: type=gha,scope=docker-build-amd64,mode=max

- name: Upload staging image as an artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: did-resolver-staging
path: did-resolver-staging.tar
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
security-events: write

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Run Markdown link check
uses: tcort/github-action-markdown-link-check@v1
Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
Expand All @@ -38,17 +38,17 @@ jobs:
cache: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
version: v1.64.6
version: v2.7.2
args: --config .github/linters/.golangci.yaml

super-lint:
name: "Super Linter"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Required to fetch version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: amannn/action-semantic-pull-request@v6
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
EXECUTE_RELEASE: ${{ steps.execute-release.outputs.EXECUTE_RELEASE }}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
if: needs.release-guard.outputs.EXECUTE_RELEASE == 'true'

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
url: https://resolver.cheqd.net

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: doctl registry login --expiry-seconds 600

- name: Download Docker image
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: did-resolver-staging

Expand All @@ -52,7 +52,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download Docker image
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: did-resolver-staging

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
Expand All @@ -34,10 +34,10 @@ jobs:
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Download Docker image
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: did-resolver-staging

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: docker compose -f tests/docker-compose-testing.yml logs --tail --follow

- name: Upload integration tests result
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: report-integration.xml
path: tests/integration/rest/report-integration.xml
Loading