mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-01-16 10:22:09 +01:00
Remove CI test runs for Go 1.21.x, 1.22.x, and 1.23.x as the minimum supported version is 1.24.0 (as defined in go.mod). This change: - Removes outdated Go versions from the test matrix - Aligns CI testing with the minimum supported version - Reduces CI execution time by removing unnecessary test runs - Maintains testing coverage for supported versions (1.24.x, 1.25.x) fix(ci): remove impossible dependencies from docker job The docker job runs on push events to master/develop branches, but it was depending on docker-test and dependency-review jobs which only run on pull_request events. This created an impossible dependency chain that prevented the docker job from ever running. This change: - Removes docker-test and dependency-review from docker job dependencies - Keeps only the test job as a dependency (which runs on both events) - Allows docker build & push to run correctly on push events - Maintains PR-specific checks (docker-test, dependency-review) for PRs chore(tooling): add pre-commit configuration Introduces a `.pre-commit-config.yaml` file to automate code quality checks before commits. This configuration includes standard hooks for file hygiene (e.g., trailing whitespace, end-of-file fixes) and integrates `golangci-lint` to lint and format Go code on staged files. This helps enforce code style and catch issues early in the development process.
45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- repo: https://github.com/golangci/golangci-lint
|
|
rev: v2.6.1
|
|
hooks:
|
|
- id: golangci-lint
|
|
name: golangci-lint
|
|
description: Fast linters runner for Go. Note that only modified files are linted, so linters like 'unused' that need to scan all files won't work as expected.
|
|
entry: golangci-lint run --new-from-rev HEAD --fix
|
|
types: [go]
|
|
language: golang
|
|
require_serial: true
|
|
pass_filenames: false
|
|
# - id: golangci-lint-full
|
|
# name: golangci-lint-full
|
|
# description: Fast linters runner for Go. Runs on all files in the module. Use this hook if you use pre-commit in CI.
|
|
# entry: golangci-lint run --fix
|
|
# types: [go]
|
|
# language: golang
|
|
# require_serial: true
|
|
# pass_filenames: false
|
|
- id: golangci-lint-fmt
|
|
name: golangci-lint-fmt
|
|
description: Fast linters runner for Go. Formats all files in the repo.
|
|
entry: golangci-lint fmt
|
|
types: [go]
|
|
language: golang
|
|
require_serial: true
|
|
pass_filenames: false
|
|
- id: golangci-lint-config-verify
|
|
name: golangci-lint-config-verify
|
|
description: Verifies the configuration file
|
|
entry: golangci-lint config verify
|
|
files: '\.golangci\.(?:yml|yaml|toml|json)'
|
|
language: golang
|
|
pass_filenames: false
|