From 36aaaa66d804d84ea362366a5d800d420ec626a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:20:41 +0200 Subject: [PATCH] Bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.0 (#37) * Bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.0 Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.2.1 to 3.3.0. - [Release notes](https://github.com/Masterminds/semver/releases) - [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md) - [Commits](https://github.com/Masterminds/semver/compare/v3.2.1...v3.3.0) --- updated-dependencies: - dependency-name: github.com/Masterminds/semver/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix broken ci --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: nhatthm --- .golangci.yaml | 16 ++++++---------- Makefile | 2 +- go.mod | 10 ++++++---- go.sum | 12 ++++++------ internal/app/ligaturize.go | 4 ++-- internal/app/version.go | 14 +++++++------- internal/ligaturizer/char_test.go | 1 - internal/ligaturizer/firacode/v3/ligaturizer.go | 2 +- 8 files changed, 29 insertions(+), 32 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 5ef2a95..09312b1 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -20,31 +20,25 @@ linters-settings: linters: enable-all: true disable: - - deadcode - depguard - - exhaustivestruct + - execinquery - exhaustruct + - exportloopref - forbidigo - forcetypeassert - gci - gochecknoglobals - - golint - gomnd - - ifshort - - interfacer - ireturn - lll - - maligned + - mnd - nonamedreturns - - nosnakecase - nolintlint # https://github.com/golangci/golangci-lint/issues/3063 - paralleltest - - scopelint - - structcheck + - perfsprint - tagalign - tagliatelle - testpackage - - varcheck - varnamelen - wrapcheck @@ -54,9 +48,11 @@ issues: exclude-rules: - linters: - dupl + - err113 - funlen - goconst - goerr113 - gomnd + - mnd - noctx path: "_test.go" diff --git a/Makefile b/Makefile index 48eaceb..ee94756 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ APP ?= ligaturizer PYTHON_VERSION ?= 3.11 ALPINE_VERSION ?= 3.19 -GOLANGCI_LINT_VERSION ?= v1.55.2 +GOLANGCI_LINT_VERSION ?= v1.61.0 GO ?= go GOLANGCI_LINT ?= $(shell go env GOPATH)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION) diff --git a/go.mod b/go.mod index 27ac006..24122d4 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,11 @@ module go.nhat.io/ligaturizer -go 1.22 +go 1.23 + +toolchain go1.23.0 require ( - github.com/Masterminds/semver/v3 v3.2.1 + github.com/Masterminds/semver/v3 v3.3.0 github.com/bool64/ctxd v1.2.1 github.com/bool64/zapctxd v1.1.1 github.com/fatih/color v1.17.0 @@ -27,7 +29,7 @@ require ( go.nhat.io/cpy/v3 v3.11.1 // indirect go.nhat.io/once v0.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 9fc421d..4932787 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/bool64/ctxd v1.2.1 h1:hARFteq0zdn4bwfmxLhak3fXFuvtJVKDH2X29VV/2ls= github.com/bool64/ctxd v1.2.1/go.mod h1:ZG6QkeGVLTiUl2mxPpyHmFhDzFZCyocr9hluBV3LYuc= github.com/bool64/dev v0.2.34 h1:P9n315P8LdpxusnYQ0X7MP1CZXwBK5ae5RZrd+GdSZE= @@ -67,10 +67,10 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/internal/app/ligaturize.go b/internal/app/ligaturize.go index 63ba3a6..e8e21b0 100644 --- a/internal/app/ligaturize.go +++ b/internal/app/ligaturize.go @@ -41,7 +41,7 @@ func ligaturizeCommand(logger *ctxd.Logger) *cobra.Command { Use: "ligaturizer [flags] input-font-file", Short: "Ligaturize a font", SilenceUsage: true, - Args: func(cmd *cobra.Command, args []string) error { + Args: func(_ *cobra.Command, args []string) error { if l := len(args); l == 0 { return errInputFontFileNotSpecified } else if l > 1 { @@ -50,7 +50,7 @@ func ligaturizeCommand(logger *ctxd.Logger) *cobra.Command { return nil }, - PreRunE: func(cmd *cobra.Command, args []string) error { + PreRunE: func(*cobra.Command, []string) error { if ligaturizerCfg.LigatureFontFile == "" && ligaturizerCfg.LigatureFontDir == "" { return errLigatureFontFileAndDirNotSpecified } diff --git a/internal/app/version.go b/internal/app/version.go index 95c5cd4..356ddca 100644 --- a/internal/app/version.go +++ b/internal/app/version.go @@ -34,7 +34,7 @@ func runVersion(stdout, stderr io.Writer, showFull bool) { rev = info.Revision.Short() } - _, _ = fmt.Fprintf(stdout, "%s (rev: %s; %s; %s/%s)\n", + _, _ = fmt.Fprintf(stdout, "%s (rev: %s; %s; %s/%s)\n", //nolint: errcheck info.Version, rev, info.GoVersion, @@ -45,13 +45,13 @@ func runVersion(stdout, stderr io.Writer, showFull bool) { return } - _, _ = fmt.Fprintln(stderr) - _, _ = fmt.Fprintf(stderr, "build user: %s\n", info.BuildUser) - _, _ = fmt.Fprintf(stderr, "build date: %s\n", info.BuildDate) - _, _ = fmt.Fprintln(stderr) - _, _ = fmt.Fprintln(stderr, "dependencies:") + _, _ = fmt.Fprintln(stderr) //nolint: errcheck + _, _ = fmt.Fprintf(stderr, "build user: %s\n", info.BuildUser) //nolint: errcheck + _, _ = fmt.Fprintf(stderr, "build date: %s\n", info.BuildDate) //nolint: errcheck + _, _ = fmt.Fprintln(stderr) //nolint: errcheck + _, _ = fmt.Fprintln(stderr, "dependencies:") //nolint: errcheck for _, dep := range info.Dependencies { - _, _ = fmt.Fprintf(stderr, " %s: %s\n", dep.Path, dep.Version) + _, _ = fmt.Fprintf(stderr, " %s: %s\n", dep.Path, dep.Version) //nolint: errcheck } } diff --git a/internal/ligaturizer/char_test.go b/internal/ligaturizer/char_test.go index 12f2990..e7fbe7a 100644 --- a/internal/ligaturizer/char_test.go +++ b/internal/ligaturizer/char_test.go @@ -50,7 +50,6 @@ func TestChar_UnmarshalText(t *testing.T) { } for _, tc := range testCases { - tc := tc t.Run(tc.scenario, func(t *testing.T) { t.Parallel() diff --git a/internal/ligaturizer/firacode/v3/ligaturizer.go b/internal/ligaturizer/firacode/v3/ligaturizer.go index b234206..60c37b3 100644 --- a/internal/ligaturizer/firacode/v3/ligaturizer.go +++ b/internal/ligaturizer/firacode/v3/ligaturizer.go @@ -204,7 +204,7 @@ func (l *Ligaturizer) addLigature( prevs := make([]string, 0, i) nexts := chars.Names()[i+1:] - for j := 0; j < i; j++ { + for j := range i { prevs = append(prevs, getCharName(j)) }