Skip to content

Commit

Permalink
Update golangci-lint version
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Jun 25, 2024
1 parent 4a939d2 commit d2a895d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.52
version: v1.59

- name: Run tests
run: make test
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ linters:
# checks whether HTTP response body is closed successfully
- bodyclose
# Go linter that checks if package imports are in a list of acceptable packages
- depguard
# - depguard
# Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
- dogsled
# Tool for code clone detection
Expand Down Expand Up @@ -157,6 +157,6 @@ issues:
source: "^//go:generate "

# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#how-to-use
service:
golangci-lint-version: 1.52.x # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.59.x # use the fixed version to not introduce new linters unexpectedly
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test: generate ## Run unit tests

.PHONY: lint
lint: ## Run linter
command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52
command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59
golangci-lint run --timeout=10m --verbose

.PHONY: generate
Expand Down
2 changes: 1 addition & 1 deletion commands/platformify.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewPlatformifyCmd(assets *vendorization.VendorAssets) *cobra.Command {
Short: fmt.Sprintf("Creates starter YAML files for your %s project", assets.ServiceName),
SilenceUsage: true,
SilenceErrors: true,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
answers := models.NewAnswers()
answers.Flavor, _ = cmd.Context().Value(FlavorKey).(string)
ctx := models.ToContext(cmd.Context(), answers)
Expand Down
2 changes: 1 addition & 1 deletion commands/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewValidateCommand(assets *vendorization.VendorAssets) *cobra.Command {
"This will check your git repository and validate your files.",
assets.ServiceName,
),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
cwd, err := os.Getwd()
if err != nil {
fmt.Fprintln(
Expand Down
2 changes: 1 addition & 1 deletion platformifier/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type genericPlatformifier struct {
// Platformify will generate the needed configuration files in the current directory.
func (p *genericPlatformifier) Platformify(ctx context.Context, input *UserInput) error {
assets, _ := vendorization.FromContext(ctx)
err := fs.WalkDir(p.templates, ".", func(name string, d fs.DirEntry, walkErr error) error {
err := fs.WalkDir(p.templates, ".", func(name string, d fs.DirEntry, _ error) error {
if d.IsDir() {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions platformifier/platformifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (s *PlatformifySuiteTester) TestSuccessfulPlatformifying() {
}
err := p.Platformify(ctx)
// THEN it doesn't return any errors
assert.NoError(s.T(), err)
assert.NoError(t, err)
})
}
}
Expand Down Expand Up @@ -436,7 +436,7 @@ func (s *PlatformifySuiteTester) TestPlatformifyingError() {
}
err := p.Platformify(ctx)
// THEN it fails
assert.Error(s.T(), err)
assert.Error(t, err)
})
}
}
Expand Down

0 comments on commit d2a895d

Please sign in to comment.