Skip to content

chore: modernize, optimize, and document the RDAP library #5

chore: modernize, optimize, and document the RDAP library

chore: modernize, optimize, and document the RDAP library #5

Workflow file for this run

name: Lint
on:
pull_request:
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".golangci.yml"
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
# Deny all token scopes by default; the lint job escalates only what it needs.
permissions: {}
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
# Allow lint annotations in the PR.
pull-requests: read
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: actions/setup-go@v5
with:
go-version: '^1.26.0'
- name: Download dependencies
run: go mod download
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Format code
run: gofumpt -w .
- name: Run golangci-lint (fix)
uses: golangci/golangci-lint-action@v9
with:
args: --fix --issues-exit-code=0 --timeout=5m
install-mode: goinstall
version: latest
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: apply linter fixes and formatting"
- name: Run golangci-lint (check)
uses: golangci/golangci-lint-action@v9
with:
args: --timeout=5m
install-mode: goinstall
version: latest