Skip to content

- #5547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 54 commits into from
Closed

- #5547

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
48ab0d1
dev: prepare CI for v2 (#5423)
ldez Feb 17, 2025
0b4dee5
dev: GitHub actions assets v2 (#5385)
ldez Feb 17, 2025
5a783ba
feat: new `fmt` command with dedicated formatter configuration (#5357)
ldez Feb 17, 2025
610cc04
feat: add an option to display config path as JSON (#5431)
ldez Feb 17, 2025
feddadf
feat: golines formatter (#5432)
ldez Feb 18, 2025
814361e
dev: add missing mapstructure tags (#5436)
ldez Feb 18, 2025
76d896a
feat: new output format configuration (#5440)
ldez Feb 19, 2025
7611c76
feat: remove compatibility layer for formatters configuration (#5446)
ldez Feb 19, 2025
fab6467
feat: remove deprecated elements (#5450)
ldez Feb 19, 2025
7bcac43
feat: remove v1 exclusion configuration (#5451)
ldez Feb 21, 2025
79fa7ab
chore: ignore globally test fix artifacts (#5453)
ldez Feb 21, 2025
e651eee
feat: new default for relative-path-mode to cfg (#5454)
ldez Feb 22, 2025
a79eeab
feat: configuration options renaming (#5462)
ldez Feb 22, 2025
378dfbd
feat: remove options (#5464)
ldez Feb 23, 2025
bed771a
feat: new default sort order (#5465)
ldez Feb 24, 2025
18e322e
feat: convert comma separated to slices (#5468)
ldez Feb 24, 2025
45f39cc
feat: new default values (#5470)
ldez Feb 25, 2025
7892153
feat: remove alternative names (#5472)
ldez Feb 25, 2025
a2b6412
chore: apply same default limitations on all formatters (#5474)
ldez Feb 25, 2025
60ac0dd
feat: new linters configuration (#5475)
ldez Mar 1, 2025
e564cce
feat: merge staticcheck, stylecheck, gosimple (#5487)
ldez Mar 4, 2025
c3a7802
docs: update pages for v2 (#5505)
ldez Mar 5, 2025
6a37088
feat: migration command (#5506)
ldez Mar 10, 2025
4d2f4d6
feat: drop v1 compatibility with exclude-dirs-use-default for fmt (#5…
ldez Mar 10, 2025
fc52a16
dev: replace FileCache by LineCache (#5518)
ldez Mar 10, 2025
9d5aef5
chore: call to action (#5519)
ldez Mar 10, 2025
23679e1
feat: new help commands related to formatters (#5517)
ldez Mar 10, 2025
0bd493b
Merge branch 'master' into 'main'
ldez Mar 11, 2025
fb7cc99
feat: use homogeneous JSON flags (#5522)
ldez Mar 11, 2025
1400552
fix: formatters shound't be enabled/disabled as linters (#5516)
ldez Mar 11, 2025
e6059cb
dev: remove IdentifierMarker (#5523)
ldez Mar 11, 2025
a424bbe
feat: check version of the configuration (#5524)
ldez Mar 11, 2025
d3c9b91
dev: rename and split workflow files (#5525)
ldez Mar 11, 2025
568cc93
dev: new v2 module name (#5526)
ldez Mar 11, 2025
c2a68c4
Merge branch 'master' into 'main'
ldez Mar 12, 2025
67eed69
docs: fix 'Slack' spelling (#5529)
alexandear Mar 12, 2025
ea53284
dev: prepare default branch switch (#5530)
ldez Mar 12, 2025
d960769
build(deps): bump github.com/ghostiam/protogetter from 0.3.9 to 0.3.1…
dependabot[bot] Mar 12, 2025
e9bc786
build(deps): bump github.com/catenacyber/perfsprint from 0.8.2 to 0.9…
dependabot[bot] Mar 12, 2025
af4b3f8
build(deps): bump github.com/ryancurrah/gomodguard from 1.3.5 to 1.4.…
dependabot[bot] Mar 12, 2025
1984b05
build(deps): bump the linter-testdata group across 3 directories with…
dependabot[bot] Mar 12, 2025
76f022e
build(deps): bump @babel/helpers from 7.15.4 to 7.26.10 in /docs (#5533)
dependabot[bot] Mar 12, 2025
0aeae0e
build(deps): bump @babel/runtime-corejs3 from 7.17.0 to 7.26.10 in /d…
dependabot[bot] Mar 12, 2025
bb4d6b7
build(deps): bump github.com/bombsimon/wsl/v4 from 4.5.0 to 4.6.0 (#5…
dependabot[bot] Mar 12, 2025
5fb0469
build(deps): bump @babel/runtime from 7.20.13 to 7.26.10 in /docs (#5…
dependabot[bot] Mar 12, 2025
b882bdd
build(deps): bump github.com/breml/bidichk from 0.3.2 to 0.3.3 (#5536)
dependabot[bot] Mar 13, 2025
fc87bfb
build(deps): bump github.com/catenacyber/perfsprint from 0.9.0 to 0.9…
dependabot[bot] Mar 13, 2025
dd6cf47
build(deps): bump github.com/breml/errchkjson from 0.4.0 to 0.4.1 (#5…
dependabot[bot] Mar 13, 2025
07e4a33
build(deps): bump github.com/Antonboom/errname from 1.0.0 to 1.1.0 (#…
dependabot[bot] Mar 13, 2025
64c6528
build(deps): bump github.com/Antonboom/testifylint from 1.5.2 to 1.6.…
dependabot[bot] Mar 13, 2025
b62fb8c
feat: error if typecheck is enabled or disabled (#5543)
ldez Mar 13, 2025
61884c8
docs: add migration guide (#5439)
alexandear Mar 13, 2025
3f6f904
fix: improve staticcheck migration (#5545)
ldez Mar 13, 2025
e64847c
📌 Pin `viper` module to `v1.12.0` in `go.mod`
busser Mar 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .custom-gcl.reference.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The golangci-lint version used to build the custom binary.
# Require.
version: v1.56.2
# Required.
version: v2.0.0

# The name of the custom binary.
# Optional.
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
go.sum linguist-generated
assets/* linguist-generated
* text=auto eol=lf
*.ps1 text eol=crlf
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ name: "CodeQL"
on:
push:
branches:
- master
- main
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- main
schedule:
- cron: '0 17 * * 5'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Documentation
name: Deploy Documentation

on:
push:
branches:
- master
- main

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
base: master
base: main
token: ${{ secrets.GOLANGCI_LINT_TOKEN }}
branch-suffix: timestamp
title: "docs: update GitHub Action assets"
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
base: master
base: main
token: ${{ secrets.GOLANGCI_LINT_TOKEN }}
branch-suffix: timestamp
title: "docs: update documentation assets"
Expand Down
86 changes: 20 additions & 66 deletions .github/workflows/pr.yml → .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: CI
name: Checks
on:
push:
branches:
- master
- main
pull_request:

Expand All @@ -28,67 +27,8 @@ jobs:
git diff --exit-code go.mod
git diff --exit-code go.sum

# We already run the current golangci-lint in tests, but here we test
# our GitHub action with the latest stable golangci-lint.
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
go-version: ${{ env.GO_VERSION }}
- name: lint
uses: golangci/[email protected]
with:
version: latest

tests-on-windows:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make.exe test

tests-on-macos:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make test

tests-on-unix:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
golang:
- '1.23'
- '1.24'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
- name: Run tests
run: make test

# Checks: GitHub action assets
check_generated:
check-generated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -114,9 +54,8 @@ jobs:
- name: Check installation script
run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint"

# Note: the command `run` is tested by the previous steps (`make test`).
commands:
needs: golangci-lint
# Note: the command `run` is tested by the other workflows (`make test`).
check-commands:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -128,6 +67,9 @@ jobs:

- run: ./golangci-lint

- run: ./golangci-lint fmt
- run: ./golangci-lint fmt --diff

- run: ./golangci-lint cache
- run: ./golangci-lint cache status
- run: ./golangci-lint cache clean
Expand All @@ -144,9 +86,21 @@ jobs:

- run: ./golangci-lint config
- run: ./golangci-lint config path
- run: ./golangci-lint config verify --schema jsonschema/golangci.jsonschema.json
- run: ./golangci-lint config path --json
# TODO(ldez) after v2: golangci.next.jsonschema.json -> golangci.jsonschema.json
- run: ./golangci-lint config verify --schema jsonschema/golangci.next.jsonschema.json

- run: ./golangci-lint help
- run: ./golangci-lint help linters
- run: ./golangci-lint help linters --json
- run: ./golangci-lint help formatters
- run: ./golangci-lint help formatters --json
- run: ./golangci-lint linters
- run: ./golangci-lint linters --json
- run: ./golangci-lint formatters
- run: ./golangci-lint formatters --json
- run: ./golangci-lint version
- run: ./golangci-lint version --short
- run: ./golangci-lint version --debug
- run: ./golangci-lint version --json
- run: ./golangci-lint version --json --debug
88 changes: 88 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Tests
on:
push:
branches:
- main
pull_request:

env:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
GO_VERSION: '1.24'

jobs:
# Check if there is any dirty change for go mod tidy
go-mod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
git diff --exit-code go.sum

# We already run the current golangci-lint in tests, but here we test
# our GitHub action with the latest stable golangci-lint.
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
go-version: ${{ env.GO_VERSION }}
# TODO(ldez): must add uncommented when [email protected] (with golangci-lint v2 support) will be created.
# - name: lint
# uses: golangci/[email protected]
# with:
# version: latest

tests-on-windows:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make.exe test

tests-on-macos:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make test

tests-on-unix:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
golang:
- '1.23'
- '1.24'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
- name: Run tests
run: make test
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ coverage.xml
/custom-gcl
.custom-gcl.yml
.custom-gcl.yaml
**/testdata/fix.tmp/
Loading