Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(golangci): bump golangci-lint to 2.0.2 #42026

Merged
merged 51 commits into from
Mar 27, 2025

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Dec 12, 2024

Proposed commit message

bump golangci-lint to 1.59.1
remove deprecated go options, by default it uses go.mod version

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

required to support go 1.23
@kruskall kruskall requested review from a team as code owners December 12, 2024 23:04
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 12, 2024
Copy link
Contributor

mergify bot commented Dec 12, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kruskall? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Dec 12, 2024

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Dec 12, 2024
@kruskall kruskall changed the title ci(golangci): bump golangci-lint to 1.62.2 ci(golangci): bump golangci-lint to 1.59.1 Dec 12, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 21, 2025
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Is this PR still applicable?

Looking like Linux+Windows lint tasks are failing

@kruskall
Copy link
Member Author

kruskall commented Mar 6, 2025

we can close it, it was opened for the go version bump but it's not necessary

@kruskall kruskall closed this Mar 6, 2025
@kruskall kruskall deleted the ci/golangci-lint branch March 6, 2025 01:34
@kruskall kruskall restored the ci/golangci-lint branch March 15, 2025 20:44
@kruskall kruskall reopened this Mar 15, 2025
@kruskall
Copy link
Member Author

@elastic/observablt-robots friendly ping for review 🙂

@kuisathaverat
Copy link
Contributor

run golangci-lint
  only new issues on pull_request: C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1876-2sPa9YOivO7s\pull.patch
  Running [D:\a\_temp\d76dbfee-6913-4991-954b-dcddb2609008\golangci-lint-1.64.8-windows-amd64\golangci-lint config path] in [D:\a\beats\beats] ...
  Running [D:\a\_temp\d76dbfee-6913-4991-954b-dcddb2609008\golangci-lint-1.64.8-windows-amd64\golangci-lint config verify] in [D:\a\beats\beats] ...
  Running [D:\a\_temp\d76dbfee-6913-4991-954b-dcddb2609008\golangci-lint-1.64.8-windows-amd64\golangci-lint run --new-from-patch=C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1876-2sPa9YOivO7s\pull.patch --new=false --new-from-rev= -v --timeout=30m --whole-files] in [D:\a\beats\beats] ...
  Error: x-pack\dockerlogbeat\pipereader\fifo_windows.go:1:1: File is not properly formatted (goimports)
  // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
  ^
  Error: x-pack\dockerlogbeat\pipereader\reader.go:1:1: File is not properly formatted (goimports)
  // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
  ^

@kruskall
Copy link
Member Author

kruskall commented Mar 26, 2025

run golangci-lint

The files are formatted correctly, this seems like an issue with golangci :(

@kruskall kruskall requested a review from a team as a code owner March 26, 2025 15:28
@kruskall kruskall changed the title ci(golangci): bump golangci-lint to 1.64.8 ci(golangci): bump golangci-lint to 2.0.2 Mar 26, 2025
@belimawr
Copy link
Contributor

The Windows error about the license header:

  Error: x-pack\dockerlogbeat\pipereader\fifo_windows.go:1:1: File is not properly formatted (goimports)
  // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one

Can be fixed by adding a .gitattributes file like this:

*.go text eol=lf

@kruskall kruskall requested a review from a team as a code owner March 27, 2025 15:24
@kruskall kruskall merged commit a6cb1bf into elastic:main Mar 27, 2025
16 checks passed
@kruskall kruskall deleted the ci/golangci-lint branch March 27, 2025 16:38
mergify bot pushed a commit that referenced this pull request Mar 27, 2025
* ci(golangci): bump golangci-lint to 1.62.2

required to support go 1.23

* Update .golangci.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update .golangci.yml

* Update .golangci.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update .golangci.yml

* feat: fix dockerlogbeat compile errors on windows

* Update reader.go

* Update fifo_windows.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update fifo_nowindows.go

* Update fifo_nowindows.go

* Update fifo_windows.go

* Update fifo_windows.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update reader.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* feat: run golangci-lint migrate

* Update .gitattributes

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit a6cb1bf)
kruskall added a commit that referenced this pull request Mar 27, 2025
* ci(golangci): bump golangci-lint to 1.62.2

required to support go 1.23

* Update .golangci.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update .golangci.yml

* Update .golangci.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update .golangci.yml

* feat: fix dockerlogbeat compile errors on windows

* Update reader.go

* Update fifo_windows.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update fifo_nowindows.go

* Update fifo_nowindows.go

* Update fifo_windows.go

* Update fifo_windows.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update reader.go

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* Update golangci-lint.yml

* feat: run golangci-lint migrate

* Update .gitattributes

---------

Co-authored-by: Dimitrios Liappis <[email protected]>
(cherry picked from commit a6cb1bf)

Co-authored-by: kruskall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify Team:Ingest-EngProd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants