diff --git a/.commitlintrc b/.commitlintrc new file mode 100644 index 0000000..d3d7f0c --- /dev/null +++ b/.commitlintrc @@ -0,0 +1 @@ +{ "extends": ["@commitlint/config-conventional"] } diff --git a/.gitignore b/.gitignore index 9f11b75..1fe1b00 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea/ +node_modules/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d846620..593ebe2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,29 @@ +default_stages: [commit] repos: + - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: "v9.10.0" + hooks: + - id: commitlint + stages: [commit-msg] + additional_dependencies: ["@commitlint/config-conventional"] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: "v4.5.0" hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.1" + rev: "v4.0.0-alpha.4" hooks: - id: prettier + exclude: "go.mod" - repo: https://github.com/golangci/golangci-lint - rev: "v1.53.3" + rev: "v1.55.2" hooks: - id: golangci-lint + args: ["--timeout", "3m0s"] + - repo: https://github.com/segmentio/golines + rev: "v0.11.0" + hooks: + - id: golines diff --git a/go.mod b/go.mod index abf5c2d..112f809 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.21 require github.com/stretchr/testify v1.7.1 -require github.com/go-faker/faker/v4 v4.1.1 +require github.com/go-faker/faker/v4 v4.2.0 -require golang.org/x/text v0.12.0 // indirect +require golang.org/x/text v0.14.0 // indirect require ( // indirect diff --git a/go.sum b/go.sum index ea0cb91..b43d6af 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-faker/faker/v4 v4.1.1 h1:zkxj/JH/aezB4R6cTEMKU7qcVScGhlB3qRtF3D7K+rI= github.com/go-faker/faker/v4 v4.1.1/go.mod h1:uuNc0PSRxF8nMgjGrrrU4Nw5cF30Jc6Kd0/FUTTYbhg= +github.com/go-faker/faker/v4 v4.2.0 h1:dGebOupKwssrODV51E0zbMrv5e2gO9VWSLNC1WDCpWg= +github.com/go-faker/faker/v4 v4.2.0/go.mod h1:F/bBy8GH9NxOxMInug5Gx4WYeG6fHJZ8Ol/dhcpRub4= 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= @@ -11,6 +13,8 @@ golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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 h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=