Skip to content

chore(source): standardize sources #5982

chore(source): standardize sources

chore(source): standardize sources #5982

Workflow file for this run

name: Lint
on:
pull_request:
branches: [ master ]
jobs:
lint:
name: Markdown and Go
runs-on: ubuntu-latest
permissions:
# Required: allow read access to the content for analysis.
contents: read
# For go lang linter
pull-requests: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Lint markdown
uses: nosborn/github-action-markdown-cli@v3.5.0
with:
files: '.'
config_file: ".markdownlint.json"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Go formatting
run: |
if [ -z "$(gofmt -l .)" ]; then
echo -e "All '*.go' files are properly formatted."
else
echo -e "Please run 'make go-lint' to fix. Some files need formatting:"
gofmt -d -l .
exit 1
fi
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#verify
- name: Verify linter configuration and Lint go code
uses: golangci/golangci-lint-action@v9
with:
verify: true
args: --timeout=30m
version: v2.7
- uses: actions/setup-python@v6
# https://github.com/pre-commit/action
- name: Verify with pre-commit
uses: pre-commit/action@v3.0.1