mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
d101da627d
* fix: upgrade golangci-lint to v2 and modernize configuration - Migrate from golangci-lint v1 to v2 configuration format - Update GitHub Actions workflow to use golangci-lint-action@v8 - Set golangci-lint version to v2.2.0 for stability - Add comprehensive linter configuration with Go 1.20 compatibility - Temporarily disable strict linting rules to unblock development - Configure formatters (gofmt, goimports, gci) separately per v2 requirements - Add extensive exclusion rules for gradual rule enforcement This change establishes a modern linting baseline that can be progressively enhanced as code quality improves. All major linting issues have been configured as non-blocking to allow incremental improvements. * chore: update golangci-lint to v2.4.0 for compatibility - Update golangci-lint version from v2.2.0 to v2.4.0 in GitHub Actions - Aligns CI environment with local development version - Resolves configuration validation errors * fix: update golangci-lint config to v2.4.0 compatible format - Remove deprecated v1 fields (skip-dirs, skip-files from run section) - Move exclusions to linters.exclusions section - Fix goimports.local-prefixes to be array format - Remove gci.skip-generated and custom-order (not supported) - Replace disable-all with default: standard - Remove deprecated issues section, use linters.exclusions instead - Fix output format from colored-line-number to text with colors - Remove unsupported fields from linter settings This ensures the config passes 'golangci-lint config verify' validation
36 lines
682 B
YAML
36 lines
682 B
YAML
name: Lint
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set Golang
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.20.x"
|
|
cache: false
|
|
|
|
- name: Check spelling with custom config file
|
|
uses: crate-ci/typos@master
|
|
with:
|
|
config: ./.typos.toml
|
|
|
|
- name: Get dependencies
|
|
run: |
|
|
go mod tidy
|
|
go mod download
|
|
|
|
- name: Lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.4.0
|