From 30906765d89628c1db8409976434a177ef9453a0 Mon Sep 17 00:00:00 2001 From: nullswan Date: Mon, 26 Aug 2024 21:46:24 +0200 Subject: [PATCH 1/4] refactor(modules): Consolidate Go modules to a single root go.mod file --- cmd/cli/go.mod | 3 - cmd/schemas/go.mod | 10 --- cmd/schemas/go.sum | 12 --- go.mod | 23 ++++++ go.sum | 35 ++++++++ go.work | 17 ---- go.work.sum | 4 - packages/cli/go.mod | 11 --- packages/cli/go.sum | 8 -- packages/configuration/go.mod | 15 ---- packages/configuration/go.sum | 14 ---- packages/executor/go.mod | 3 - packages/executor/go.sum | 0 packages/git-client/go.mod | 11 --- packages/git-client/go.sum | 10 --- packages/hooks-scripts/go.mod | 3 - packages/logging/go.mod | 10 --- packages/logging/go.sum | 15 ---- packages/meta/go.mod | 4 - packages/scheduler/go.mod | 14 ---- packages/scheduler/go.sum | 11 --- packages/scheduler/scheduler_test.go | 116 ++++++++++++++++++++------- packages/test-helpers/go.mod | 11 --- packages/test-helpers/go.sum | 5 -- 24 files changed, 143 insertions(+), 222 deletions(-) delete mode 100644 cmd/cli/go.mod delete mode 100644 cmd/schemas/go.mod delete mode 100644 cmd/schemas/go.sum create mode 100644 go.mod create mode 100644 go.sum delete mode 100644 go.work delete mode 100644 go.work.sum delete mode 100644 packages/cli/go.mod delete mode 100644 packages/cli/go.sum delete mode 100644 packages/configuration/go.mod delete mode 100644 packages/configuration/go.sum delete mode 100644 packages/executor/go.mod delete mode 100644 packages/executor/go.sum delete mode 100644 packages/git-client/go.mod delete mode 100644 packages/git-client/go.sum delete mode 100644 packages/hooks-scripts/go.mod delete mode 100644 packages/logging/go.mod delete mode 100644 packages/logging/go.sum delete mode 100644 packages/meta/go.mod delete mode 100644 packages/scheduler/go.mod delete mode 100644 packages/scheduler/go.sum delete mode 100644 packages/test-helpers/go.mod delete mode 100644 packages/test-helpers/go.sum diff --git a/cmd/cli/go.mod b/cmd/cli/go.mod deleted file mode 100644 index 8bf848b..0000000 --- a/cmd/cli/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/LMaxence/gookme/cmd/cli - -go 1.22.4 diff --git a/cmd/schemas/go.mod b/cmd/schemas/go.mod deleted file mode 100644 index d754fa7..0000000 --- a/cmd/schemas/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/LMaxence/gookme/cmd/schemas - -go 1.22.4 - -require github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b - -require ( - github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect - github.com/stretchr/testify v1.9.0 // indirect -) diff --git a/cmd/schemas/go.sum b/cmd/schemas/go.sum deleted file mode 100644 index 091efac..0000000 --- a/cmd/schemas/go.sum +++ /dev/null @@ -1,12 +0,0 @@ -github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b h1:doCpXjVwui6HUN+xgNsNS3SZ0/jUZ68Eb+mJRNOZfog= -github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..9cd0962 --- /dev/null +++ b/go.mod @@ -0,0 +1,23 @@ +module github.com/LMaxence/gookme + +go 1.22.4 + +require ( + github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b + github.com/bmatcuk/doublestar/v4 v4.6.1 + github.com/google/uuid v1.6.0 + github.com/sirupsen/logrus v1.9.3 + github.com/stretchr/testify v1.9.0 + github.com/urfave/cli/v2 v2.27.4 +) + +require ( + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..84a4512 --- /dev/null +++ b/go.sum @@ -0,0 +1,35 @@ +github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b h1:doCpXjVwui6HUN+xgNsNS3SZ0/jUZ68Eb+mJRNOZfog= +github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= +github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= +github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.work b/go.work deleted file mode 100644 index dfe30d8..0000000 --- a/go.work +++ /dev/null @@ -1,17 +0,0 @@ -go 1.22.4 - -toolchain go1.22.4 - -use ( - ./cmd/cli - ./cmd/schemas - ./packages/cli - ./packages/configuration - ./packages/executor - ./packages/git-client - ./packages/hooks-scripts - ./packages/logging - ./packages/meta - ./packages/scheduler - ./packages/test-helpers -) diff --git a/go.work.sum b/go.work.sum deleted file mode 100644 index 839f089..0000000 --- a/go.work.sum +++ /dev/null @@ -1,4 +0,0 @@ -atomicgo.dev/cursor v0.2.0/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= diff --git a/packages/cli/go.mod b/packages/cli/go.mod deleted file mode 100644 index ae09943..0000000 --- a/packages/cli/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/LMaxence/gookme/packages/cli - -go 1.22.4 - -require github.com/urfave/cli/v2 v2.27.4 - -require ( - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect -) diff --git a/packages/cli/go.sum b/packages/cli/go.sum deleted file mode 100644 index 46bd4d8..0000000 --- a/packages/cli/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= -github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= -github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= -github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= diff --git a/packages/configuration/go.mod b/packages/configuration/go.mod deleted file mode 100644 index 6c6ae43..0000000 --- a/packages/configuration/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/LMaxence/gookme/packages/configuration - -go 1.22.4 - -require ( - github.com/bmatcuk/doublestar/v4 v4.6.1 - github.com/google/uuid v1.6.0 - github.com/stretchr/testify v1.9.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/packages/configuration/go.sum b/packages/configuration/go.sum deleted file mode 100644 index da1743d..0000000 --- a/packages/configuration/go.sum +++ /dev/null @@ -1,14 +0,0 @@ -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/packages/executor/go.mod b/packages/executor/go.mod deleted file mode 100644 index 9c55236..0000000 --- a/packages/executor/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/LMaxence/gookme/packages/executor - -go 1.22.4 diff --git a/packages/executor/go.sum b/packages/executor/go.sum deleted file mode 100644 index e69de29..0000000 diff --git a/packages/git-client/go.mod b/packages/git-client/go.mod deleted file mode 100644 index 120e339..0000000 --- a/packages/git-client/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/LMaxence/gookme/packages/git-client - -go 1.22.4 - -require github.com/stretchr/testify v1.9.0 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/packages/git-client/go.sum b/packages/git-client/go.sum deleted file mode 100644 index 60ce688..0000000 --- a/packages/git-client/go.sum +++ /dev/null @@ -1,10 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/packages/hooks-scripts/go.mod b/packages/hooks-scripts/go.mod deleted file mode 100644 index eb7a8d0..0000000 --- a/packages/hooks-scripts/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/LMaxence/gookme/packages/hooks-scripts - -go 1.22.4 diff --git a/packages/logging/go.mod b/packages/logging/go.mod deleted file mode 100644 index ce64314..0000000 --- a/packages/logging/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/LMaxence/gookme/packages/logging - -go 1.22.4 - -require github.com/sirupsen/logrus v1.9.3 - -require ( - github.com/stretchr/testify v1.9.0 // indirect - golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect -) diff --git a/packages/logging/go.sum b/packages/logging/go.sum deleted file mode 100644 index 05efb6b..0000000 --- a/packages/logging/go.sum +++ /dev/null @@ -1,15 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/packages/meta/go.mod b/packages/meta/go.mod deleted file mode 100644 index 5ca2f23..0000000 --- a/packages/meta/go.mod +++ /dev/null @@ -1,4 +0,0 @@ -module github.com/LMaxence/gookme/packages/meta - -go 1.22.4 - diff --git a/packages/scheduler/go.mod b/packages/scheduler/go.mod deleted file mode 100644 index 11a6a45..0000000 --- a/packages/scheduler/go.mod +++ /dev/null @@ -1,14 +0,0 @@ -module github.com/LMaxence/gookme/packages/scheduler - -go 1.22.4 - -require ( - github.com/bmatcuk/doublestar/v4 v4.6.1 - github.com/stretchr/testify v1.9.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/packages/scheduler/go.sum b/packages/scheduler/go.sum deleted file mode 100644 index 7bca5dd..0000000 --- a/packages/scheduler/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/packages/scheduler/scheduler_test.go b/packages/scheduler/scheduler_test.go index a43b059..572daa7 100644 --- a/packages/scheduler/scheduler_test.go +++ b/packages/scheduler/scheduler_test.go @@ -34,7 +34,10 @@ func TestFilterScheduledHooksWithChangeset(t *testing.T) { } func TestFilterScheduledHooksWithLargerChangeset(t *testing.T) { - changedPaths := []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"} + changedPaths := []string{ + "/packages/path1/somefile.go", + "/packages/path2/somefile.go", + } hooks := []configuration.Hook{ { Path: "/packages/path1", @@ -71,25 +74,37 @@ var filterChangesetWithPrefixTestCases = []struct { expected []string }{ { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path1", - expected: []string{"/packages/path1/somefile.go"}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path2/somefile.go", + }, + prefix: "/packages/path1", + expected: []string{"/packages/path1/somefile.go"}, }, { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path2", - expected: []string{"/packages/path2/somefile.go"}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path2/somefile.go", + }, + prefix: "/packages/path2", + expected: []string{"/packages/path2/somefile.go"}, }, { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path3", - expected: []string{}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path2/somefile.go", + }, + prefix: "/packages/path3", + expected: []string{}, }, } func TestFilterChangesetWithPrefix(t *testing.T) { for _, testCase := range filterChangesetWithPrefixTestCases { - filteredPaths := filterChangesetWithPrefix(testCase.changedPaths, testCase.prefix) + filteredPaths := filterChangesetWithPrefix( + testCase.changedPaths, + testCase.prefix, + ) assert.Equal(t, testCase.expected, filteredPaths) } } @@ -100,30 +115,48 @@ var filterChangesetWithPatternTestCases = []struct { expected []string }{ { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "*.json", - expected: []string{"/packages/path1/somefile.json"}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path1/somefile.json", + }, + pattern: "*.json", + expected: []string{"/packages/path1/somefile.json"}, }, { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "test/*.json", - expected: []string{}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path1/somefile.json", + }, + pattern: "test/*.json", + expected: []string{}, }, { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "packages/path1/*.json", - expected: []string{"/packages/path1/somefile.json"}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path1/somefile.json", + }, + pattern: "packages/path1/*.json", + expected: []string{"/packages/path1/somefile.json"}, }, { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "*.{go,json}", - expected: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, + changedPaths: []string{ + "/packages/path1/somefile.go", + "/packages/path1/somefile.json", + }, + pattern: "*.{go,json}", + expected: []string{ + "/packages/path1/somefile.go", + "/packages/path1/somefile.json", + }, }, } func TestFilterChangesetWithPatter(t *testing.T) { for _, testCase := range filterChangesetWithPatternTestCases { - filteredPaths, err := filterChangesetWithPattern(testCase.changedPaths, testCase.pattern) + filteredPaths, err := filterChangesetWithPattern( + testCase.changedPaths, + testCase.pattern, + ) assert.Nil(t, err) assert.Equal(t, testCase.expected, filteredPaths) } @@ -168,32 +201,50 @@ var filterStepsWithOnlyOnTestCases = []struct { { changedPaths: []string{"/packages/path1/somefile.go"}, hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&goStarPattern}, + ), }, expected: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&goStarPattern}, + ), }, }, { changedPaths: []string{"/packages/path1/somefile.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&goStarPattern}, + ), }, expected: []configuration.Hook{}, }, { changedPaths: []string{"/packages/path1/somefile.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&somefileStarPattern}, + ), }, expected: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&somefileStarPattern}, + ), }, }, { changedPaths: []string{"/packages/path1/some-other-file.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), + fixtureHookConfiguration( + "/packages/path1", + []*string{&somefileStarPattern}, + ), }, expected: []configuration.Hook{}, }, @@ -201,7 +252,10 @@ var filterStepsWithOnlyOnTestCases = []struct { func TestFilterStepsWithOnlyOn(t *testing.T) { for _, testCase := range filterStepsWithOnlyOnTestCases { - filteredHooks := FilterStepsWithOnlyOn(testCase.changedPaths, testCase.hooks) + filteredHooks := FilterStepsWithOnlyOn( + testCase.changedPaths, + testCase.hooks, + ) assert.Equal(t, len(testCase.expected), len(filteredHooks)) for i, expectedHook := range testCase.expected { diff --git a/packages/test-helpers/go.mod b/packages/test-helpers/go.mod deleted file mode 100644 index fd7a14d..0000000 --- a/packages/test-helpers/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/LMaxence/gookme/packages/test-helpers - -go 1.22.4 - -require github.com/stretchr/testify v1.9.0 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/packages/test-helpers/go.sum b/packages/test-helpers/go.sum deleted file mode 100644 index dce66d6..0000000 --- a/packages/test-helpers/go.sum +++ /dev/null @@ -1,5 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 1dd38e95e65a56e706cb65a66f5e33a20709b681 Mon Sep 17 00:00:00 2001 From: nullswan Date: Mon, 26 Aug 2024 21:48:41 +0200 Subject: [PATCH 2/4] fix: revert autolint of schedulertest --- packages/scheduler/scheduler_test.go | 116 +++++++-------------------- 1 file changed, 31 insertions(+), 85 deletions(-) diff --git a/packages/scheduler/scheduler_test.go b/packages/scheduler/scheduler_test.go index 572daa7..a43b059 100644 --- a/packages/scheduler/scheduler_test.go +++ b/packages/scheduler/scheduler_test.go @@ -34,10 +34,7 @@ func TestFilterScheduledHooksWithChangeset(t *testing.T) { } func TestFilterScheduledHooksWithLargerChangeset(t *testing.T) { - changedPaths := []string{ - "/packages/path1/somefile.go", - "/packages/path2/somefile.go", - } + changedPaths := []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"} hooks := []configuration.Hook{ { Path: "/packages/path1", @@ -74,37 +71,25 @@ var filterChangesetWithPrefixTestCases = []struct { expected []string }{ { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path2/somefile.go", - }, - prefix: "/packages/path1", - expected: []string{"/packages/path1/somefile.go"}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, + prefix: "/packages/path1", + expected: []string{"/packages/path1/somefile.go"}, }, { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path2/somefile.go", - }, - prefix: "/packages/path2", - expected: []string{"/packages/path2/somefile.go"}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, + prefix: "/packages/path2", + expected: []string{"/packages/path2/somefile.go"}, }, { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path2/somefile.go", - }, - prefix: "/packages/path3", - expected: []string{}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, + prefix: "/packages/path3", + expected: []string{}, }, } func TestFilterChangesetWithPrefix(t *testing.T) { for _, testCase := range filterChangesetWithPrefixTestCases { - filteredPaths := filterChangesetWithPrefix( - testCase.changedPaths, - testCase.prefix, - ) + filteredPaths := filterChangesetWithPrefix(testCase.changedPaths, testCase.prefix) assert.Equal(t, testCase.expected, filteredPaths) } } @@ -115,48 +100,30 @@ var filterChangesetWithPatternTestCases = []struct { expected []string }{ { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path1/somefile.json", - }, - pattern: "*.json", - expected: []string{"/packages/path1/somefile.json"}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, + pattern: "*.json", + expected: []string{"/packages/path1/somefile.json"}, }, { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path1/somefile.json", - }, - pattern: "test/*.json", - expected: []string{}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, + pattern: "test/*.json", + expected: []string{}, }, { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path1/somefile.json", - }, - pattern: "packages/path1/*.json", - expected: []string{"/packages/path1/somefile.json"}, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, + pattern: "packages/path1/*.json", + expected: []string{"/packages/path1/somefile.json"}, }, { - changedPaths: []string{ - "/packages/path1/somefile.go", - "/packages/path1/somefile.json", - }, - pattern: "*.{go,json}", - expected: []string{ - "/packages/path1/somefile.go", - "/packages/path1/somefile.json", - }, + changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, + pattern: "*.{go,json}", + expected: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, }, } func TestFilterChangesetWithPatter(t *testing.T) { for _, testCase := range filterChangesetWithPatternTestCases { - filteredPaths, err := filterChangesetWithPattern( - testCase.changedPaths, - testCase.pattern, - ) + filteredPaths, err := filterChangesetWithPattern(testCase.changedPaths, testCase.pattern) assert.Nil(t, err) assert.Equal(t, testCase.expected, filteredPaths) } @@ -201,50 +168,32 @@ var filterStepsWithOnlyOnTestCases = []struct { { changedPaths: []string{"/packages/path1/somefile.go"}, hooks: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&goStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), }, expected: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&goStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), }, }, { changedPaths: []string{"/packages/path1/somefile.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&goStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), }, expected: []configuration.Hook{}, }, { changedPaths: []string{"/packages/path1/somefile.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&somefileStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), }, expected: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&somefileStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), }, }, { changedPaths: []string{"/packages/path1/some-other-file.json"}, hooks: []configuration.Hook{ - fixtureHookConfiguration( - "/packages/path1", - []*string{&somefileStarPattern}, - ), + fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), }, expected: []configuration.Hook{}, }, @@ -252,10 +201,7 @@ var filterStepsWithOnlyOnTestCases = []struct { func TestFilterStepsWithOnlyOn(t *testing.T) { for _, testCase := range filterStepsWithOnlyOnTestCases { - filteredHooks := FilterStepsWithOnlyOn( - testCase.changedPaths, - testCase.hooks, - ) + filteredHooks := FilterStepsWithOnlyOn(testCase.changedPaths, testCase.hooks) assert.Equal(t, len(testCase.expected), len(filteredHooks)) for i, expectedHook := range testCase.expected { From 55bab1cce878706200296b1fdac98f570929642a Mon Sep 17 00:00:00 2001 From: nullswan Date: Wed, 28 Aug 2024 10:54:35 +0200 Subject: [PATCH 3/4] ci: simplify dependency management and linting --- .github/dependabot.yml | 72 +---------------------------------- .github/workflows/ci-lint.yml | 20 ---------- .github/workflows/ci-test.yml | 2 +- hooks/pre-commit.json | 4 +- 4 files changed, 4 insertions(+), 94 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 01cb8b6..67dbbfe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,77 +4,7 @@ version: 2 updates: - package-ecosystem: "gomod" - directory: "./cmd/cli" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./cmd/schemas" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/cli" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/configuration" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/executor" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/git-client" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/hooks-scripts" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/logging" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/meta" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/scheduler" - schedule: - interval: "weekly" - commit-message: - prefix: "deps" - open-pull-requests-limit: 1 - - package-ecosystem: "gomod" - directory: "./packages/test-helpers" + directory: "." schedule: interval: "weekly" commit-message: diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 3087b68..9d80c0f 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -8,27 +8,8 @@ env: GOLANGCI_LINT_VERSION: v1.58 jobs: - detect-modules: - runs-on: ubuntu-latest - outputs: - modules: ${{ steps.set-modules.outputs.modules }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install Golang - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - - name: List Go modules - id: set-modules - run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT - golangci-lint: - needs: detect-modules runs-on: ubuntu-latest - strategy: - matrix: - modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -40,4 +21,3 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: ${{ env.GOLANGCI_LINT_VERSION }} - working-directory: ${{ matrix.modules }} \ No newline at end of file diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index c829f0e..e31066a 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -20,7 +20,7 @@ jobs: - name: Create temporary directory run: mkdir -p ${{ github.workspace }}/tmp - name: Run Golang tests - run: go test -coverprofile=coverage.txt $(go list -f '{{.Dir}}/...' -m) + run: go test -coverprofile=coverage.txt ./... env: TMPDIR: ${{ github.workspace }}/tmp - name: Upload results to Codecov diff --git a/hooks/pre-commit.json b/hooks/pre-commit.json index 4443839..e0ff136 100644 --- a/hooks/pre-commit.json +++ b/hooks/pre-commit.json @@ -8,7 +8,7 @@ }, { "name": "Code quality", - "command": "golangci-lint run $(go list -f '{{.Dir}}/...' -m)", + "command": "golangci-lint run ./...", "onlyOn": "*.go" }, { @@ -16,4 +16,4 @@ "command": "make assets" } ] -} +} \ No newline at end of file From 55bd49f0af8554f99e66a9dd4fa5acd2f3a012d0 Mon Sep 17 00:00:00 2001 From: nullswan Date: Wed, 28 Aug 2024 10:55:35 +0200 Subject: [PATCH 4/4] ci(workflows): update golangci-lint job name --- .github/workflows/ci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 9d80c0f..0907904 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - name: Run golangci-lint in ${{ matrix.modules }} + - name: Run golangci-lint uses: golangci/golangci-lint-action@v6 with: version: ${{ env.GOLANGCI_LINT_VERSION }}