From 08b92eb86e50d43190e659a593bc59888781675f Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 28 Nov 2025 16:56:56 +0100 Subject: [PATCH] chore: move samples into fixtures --- .github/workflows/test.yml | 12 ++++++------ {sample-go-mod => fixtures/go-mod}/.golangci.yml | 0 {sample-go-mod => fixtures/go-mod}/go.mod | 2 +- {sample-go-mod => fixtures/go-mod}/go.sum | 0 {sample-go-mod => fixtures/go-mod}/sample.go | 0 {sample-go-mod => fixtures/go-mod}/tools.go | 0 {sample-go-tool => fixtures/go-tool}/.golangci.yml | 0 {sample-go-tool => fixtures/go-tool}/go.mod | 2 +- {sample-go-tool => fixtures/go-tool}/go.sum | 0 {sample-go-tool => fixtures/go-tool}/sample.go | 0 {sample-monorepo => fixtures/monorepo}/a/go.mod | 0 {sample-monorepo => fixtures/monorepo}/a/sample.go | 0 {sample-monorepo => fixtures/monorepo}/a/suba/go.mod | 0 .../monorepo}/a/suba/sample.go | 0 {sample-monorepo => fixtures/monorepo}/b/go.mod | 0 {sample-monorepo => fixtures/monorepo}/b/sample.go | 0 {sample-monorepo => fixtures/monorepo}/c/go.mod | 0 {sample-monorepo => fixtures/monorepo}/c/sample.go | 0 {sample-plugins => fixtures/plugins}/.custom-gcl.yml | 0 {sample-plugins => fixtures/plugins}/.gitignore | 0 {sample-plugins => fixtures/plugins}/.golangci.yml | 0 {sample-plugins => fixtures/plugins}/go.mod | 0 {sample-plugins => fixtures/plugins}/sample.go | 0 {sample => fixtures/simple}/sample.go | 0 24 files changed, 8 insertions(+), 8 deletions(-) rename {sample-go-mod => fixtures/go-mod}/.golangci.yml (100%) rename {sample-go-mod => fixtures/go-mod}/go.mod (99%) rename {sample-go-mod => fixtures/go-mod}/go.sum (100%) rename {sample-go-mod => fixtures/go-mod}/sample.go (100%) rename {sample-go-mod => fixtures/go-mod}/tools.go (100%) rename {sample-go-tool => fixtures/go-tool}/.golangci.yml (100%) rename {sample-go-tool => fixtures/go-tool}/go.mod (99%) rename {sample-go-tool => fixtures/go-tool}/go.sum (100%) rename {sample-go-tool => fixtures/go-tool}/sample.go (100%) rename {sample-monorepo => fixtures/monorepo}/a/go.mod (100%) rename {sample-monorepo => fixtures/monorepo}/a/sample.go (100%) rename {sample-monorepo => fixtures/monorepo}/a/suba/go.mod (100%) rename {sample-monorepo => fixtures/monorepo}/a/suba/sample.go (100%) rename {sample-monorepo => fixtures/monorepo}/b/go.mod (100%) rename {sample-monorepo => fixtures/monorepo}/b/sample.go (100%) rename {sample-monorepo => fixtures/monorepo}/c/go.mod (100%) rename {sample-monorepo => fixtures/monorepo}/c/sample.go (100%) rename {sample-plugins => fixtures/plugins}/.custom-gcl.yml (100%) rename {sample-plugins => fixtures/plugins}/.gitignore (100%) rename {sample-plugins => fixtures/plugins}/.golangci.yml (100%) rename {sample-plugins => fixtures/plugins}/go.mod (100%) rename {sample-plugins => fixtures/plugins}/sample.go (100%) rename {sample => fixtures/simple}/sample.go (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b58026335..d12b36e770 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: - uses: ./ with: version: ${{ matrix.version }} - args: --timeout=5m --issues-exit-code=0 ./sample/... + args: --timeout=5m --issues-exit-code=0 ./fixtures/simple/... only-new-issues: true test-go-install: # make sure the action works on a clean machine without building (go-install mode) @@ -83,7 +83,7 @@ jobs: - uses: ./ with: version: ${{ matrix.version }} - args: --timeout=5m --issues-exit-code=0 ./sample/... + args: --timeout=5m --issues-exit-code=0 ./fixtures/simple/... only-new-issues: true install-mode: goinstall @@ -97,8 +97,8 @@ jobs: - macos-latest - windows-latest wd: - - sample-go-mod - - sample-go-tool + - fixtures/go-mod + - fixtures/go-tool runs-on: ${{ matrix.os }} permissions: contents: read @@ -144,7 +144,7 @@ jobs: - uses: ./ with: version: ${{ matrix.version }} - working-directory: sample-plugins + working-directory: fixtures/plugins args: --timeout=5m --issues-exit-code=0 ./... test-monorepo: @@ -170,6 +170,6 @@ jobs: go-version: oldstable - uses: ./ with: - working-directory: sample-monorepo + working-directory: fixtures/monorepo experimental: "automatic-module-directories" args: --timeout=5m --issues-exit-code=0 ./... diff --git a/sample-go-mod/.golangci.yml b/fixtures/go-mod/.golangci.yml similarity index 100% rename from sample-go-mod/.golangci.yml rename to fixtures/go-mod/.golangci.yml diff --git a/sample-go-mod/go.mod b/fixtures/go-mod/go.mod similarity index 99% rename from sample-go-mod/go.mod rename to fixtures/go-mod/go.mod index 9c3fe60071..ab4ff4daea 100644 --- a/sample-go-mod/go.mod +++ b/fixtures/go-mod/go.mod @@ -1,4 +1,4 @@ -module sample +module github.com/golangci/sample go 1.24.0 diff --git a/sample-go-mod/go.sum b/fixtures/go-mod/go.sum similarity index 100% rename from sample-go-mod/go.sum rename to fixtures/go-mod/go.sum diff --git a/sample-go-mod/sample.go b/fixtures/go-mod/sample.go similarity index 100% rename from sample-go-mod/sample.go rename to fixtures/go-mod/sample.go diff --git a/sample-go-mod/tools.go b/fixtures/go-mod/tools.go similarity index 100% rename from sample-go-mod/tools.go rename to fixtures/go-mod/tools.go diff --git a/sample-go-tool/.golangci.yml b/fixtures/go-tool/.golangci.yml similarity index 100% rename from sample-go-tool/.golangci.yml rename to fixtures/go-tool/.golangci.yml diff --git a/sample-go-tool/go.mod b/fixtures/go-tool/go.mod similarity index 99% rename from sample-go-tool/go.mod rename to fixtures/go-tool/go.mod index e208f51d07..333a450e4b 100644 --- a/sample-go-tool/go.mod +++ b/fixtures/go-tool/go.mod @@ -1,4 +1,4 @@ -module sample +module github.com/golangci/sample go 1.24.0 diff --git a/sample-go-tool/go.sum b/fixtures/go-tool/go.sum similarity index 100% rename from sample-go-tool/go.sum rename to fixtures/go-tool/go.sum diff --git a/sample-go-tool/sample.go b/fixtures/go-tool/sample.go similarity index 100% rename from sample-go-tool/sample.go rename to fixtures/go-tool/sample.go diff --git a/sample-monorepo/a/go.mod b/fixtures/monorepo/a/go.mod similarity index 100% rename from sample-monorepo/a/go.mod rename to fixtures/monorepo/a/go.mod diff --git a/sample-monorepo/a/sample.go b/fixtures/monorepo/a/sample.go similarity index 100% rename from sample-monorepo/a/sample.go rename to fixtures/monorepo/a/sample.go diff --git a/sample-monorepo/a/suba/go.mod b/fixtures/monorepo/a/suba/go.mod similarity index 100% rename from sample-monorepo/a/suba/go.mod rename to fixtures/monorepo/a/suba/go.mod diff --git a/sample-monorepo/a/suba/sample.go b/fixtures/monorepo/a/suba/sample.go similarity index 100% rename from sample-monorepo/a/suba/sample.go rename to fixtures/monorepo/a/suba/sample.go diff --git a/sample-monorepo/b/go.mod b/fixtures/monorepo/b/go.mod similarity index 100% rename from sample-monorepo/b/go.mod rename to fixtures/monorepo/b/go.mod diff --git a/sample-monorepo/b/sample.go b/fixtures/monorepo/b/sample.go similarity index 100% rename from sample-monorepo/b/sample.go rename to fixtures/monorepo/b/sample.go diff --git a/sample-monorepo/c/go.mod b/fixtures/monorepo/c/go.mod similarity index 100% rename from sample-monorepo/c/go.mod rename to fixtures/monorepo/c/go.mod diff --git a/sample-monorepo/c/sample.go b/fixtures/monorepo/c/sample.go similarity index 100% rename from sample-monorepo/c/sample.go rename to fixtures/monorepo/c/sample.go diff --git a/sample-plugins/.custom-gcl.yml b/fixtures/plugins/.custom-gcl.yml similarity index 100% rename from sample-plugins/.custom-gcl.yml rename to fixtures/plugins/.custom-gcl.yml diff --git a/sample-plugins/.gitignore b/fixtures/plugins/.gitignore similarity index 100% rename from sample-plugins/.gitignore rename to fixtures/plugins/.gitignore diff --git a/sample-plugins/.golangci.yml b/fixtures/plugins/.golangci.yml similarity index 100% rename from sample-plugins/.golangci.yml rename to fixtures/plugins/.golangci.yml diff --git a/sample-plugins/go.mod b/fixtures/plugins/go.mod similarity index 100% rename from sample-plugins/go.mod rename to fixtures/plugins/go.mod diff --git a/sample-plugins/sample.go b/fixtures/plugins/sample.go similarity index 100% rename from sample-plugins/sample.go rename to fixtures/plugins/sample.go diff --git a/sample/sample.go b/fixtures/simple/sample.go similarity index 100% rename from sample/sample.go rename to fixtures/simple/sample.go