Skip to content

update go to 1.24 and golangci-lint to 2.1.5 - #66

Merged
thaJeztah merged 2 commits into
docker:mainfrom
crazy-max:go-1.24
May 19, 2025
Merged

update go to 1.24 and golangci-lint to 2.1.5#66
thaJeztah merged 2 commits into
docker:mainfrom
crazy-max:go-1.24

Conversation

@crazy-max

Copy link
Copy Markdown
Member

No description provided.

@crazy-max
crazy-max requested a review from thaJeztahMay 19, 2025 12:45
@crazy-max
crazy-max marked this pull request as ready for review May 19, 2025 12:45
Comment thread.golangci.yml Outdated
Comment on lines +26 to +30
presets:
- comments
- common-false-positives
- legacy
- std-error-handling

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISTR specifying these makes it skip some (not run "more")? Wondering if CY is happy if presents is empty?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah true and it fails for comments preset:

#20 [lint 1/1] RUN --mount=type=bind,target=. --mount=type=cache,target=/root/.cache --mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint golangci-lint run ./... #20 0.995 annotation/annotation.go:15:1: package-comments: should have a package comment (revive)
#20 0.995 package annotation
#20 0.995 ^
#20 0.995 clidocstool.go:15:1: package-comments: should have a package comment (revive)
#20 0.995 package clidocstool
#20 0.995 ^
#20 0.995 2 issues:
#20 0.995 * revive: 2
#20 ERROR: process "/bin/sh -c golangci-lint run ./..." did not complete successfully: exit code: 1

I guess we can just exclude this one as it was not catched before?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, either we can add a package comment (if there's only a few) or we can add excludes for a couple; https://github.com/moby/moby/blob/7937f0846c130e91836f5f640c41ce12d07da4c8/.golangci.yml#L152-L158

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, either we can add a package comment (if there's only a few) or we can add excludes for a couple; https://github.com/moby/moby/blob/7937f0846c130e91836f5f640c41ce12d07da4c8/.golangci.yml#L152-L158

Is this one complementary or a duplicate https://github.com/moby/moby/blob/7937f0846c130e91836f5f640c41ce12d07da4c8/.golangci.yml#L146-L150 of staticcheck - -ST1000? Here seems only a revive rule.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments to packages

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
thaJeztah merged commit 881b2fe into docker:mainMay 19, 2025
@crazy-max
crazy-max deleted the go-1.24 branch May 19, 2025 13:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@crazy-max@thaJeztah