Skip to content

style: update lint rules #251

style: update lint rules

style: update lint rules #251

Workflow file for this run

name: golangci-lint
on:
push:
branches:
- main
tags:
- v*
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set Github ENV variables
shell: bash
run: |
echo "GO_VERSION=$(cat go.mod | sed -En 's/go ([0-9.]+)/\1/p' | tr -d '[:blank:]')" >> $GITHUB_ENV
echo "GOLANGCI_LINT_VERSION=$(cat Makefile | sed -En 's/GOLANGCI_LINT_VERSION.+v(.*)/\1/p')" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v${{ env.GOLANGCI_LINT_VERSION }}