Files
autogits/.gitea/workflows/formatting.yaml
T
enavarro_suse a5ad44170c
Integration (Selective) / check (pull_request) Successful in 1s
gofmt / Format checking (pull_request) Successful in 5s
go-test-unit / go-test-unit (pull_request) Successful in 50s
gofmt / Linter and static analysis (pull_request) Successful in 1m17s
Integration (Selective) / integration (pull_request) Successful in 8m54s
ci: configure golangci-lint with new-from-rev filter for legacy code
Add 'new-from-rev: main' issue filter to .golangci.yml. This configures
the linter to only report new issues introduced in current PRs/branches
compared to the main branch, preventing legacy technical debt from
blocking the CI and local development workflows.

Assisted-by: Gemini:gemini-3-5-flash
2026-06-22 16:50:47 +02:00

34 lines
940 B
YAML

name: gofmt
on:
push:
branches: ['main']
pull_request:
workflow_dispatch:
jobs:
go-test-unit:
name: Format checking
container:
image: registry.opensuse.org/devel/factory/git-workflow/containers/opensuse/bci/golang-extended:latest
steps:
- name: Checkout
run: |
git clone --no-checkout --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }} .
git fetch origin ${{ gitea.ref }}
git checkout FETCH_HEAD
- name: Run formatting check
run: make gofmt
golangci:
name: Linter and static analysis
container:
image: docker.io/golangci/golangci-lint:v2.12.2
steps:
- name: Checkout
run: |
git clone --no-checkout --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }} .
git fetch origin ${{ gitea.ref }}
git checkout FETCH_HEAD
- name: Run golangci-lint
run: golangci-lint run