Skip to content

feat(source)!: introduce optional force-default-targets #4586

feat(source)!: introduce optional force-default-targets

feat(source)!: introduce optional force-default-targets #4586

Workflow file for this run

name: Lint
on:
pull_request:
branches: [ master ]
jobs:
lint:
name: Markdown, Go and OAS
runs-on: ubuntu-latest
permissions:
# Required: allow read access to the content for analysis.
contents: read
# For OAS check
checks: write
# For go lang linter
pull-requests: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Lint markdown
uses: nosborn/[email protected]
with:
files: '.'
config_file: ".markdownlint.json"
- name: Set up Go
uses: actions/setup-go@v5
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@v8
with:
verify: true
args: --timeout=30m
version: v2.1
# Run Spectral
- name: Lint OpenAPI spec
uses: stoplightio/spectral-action@577bade2d6e0eeb50528c94182a5588bf961ae8f # v0.8.12
with:
file_glob: 'api/*.yaml'
- uses: actions/setup-python@v5
# https://github.com/pre-commit/action
- name: Verify with pre-commit
uses: pre-commit/[email protected]