Skip to content

Conversation

ldez
Copy link
Member

@ldez ldez commented Jan 2, 2025

  1. When there is a build directives, goheader reports invalid issues.
  2. Inside golangci-lint we are using the same code as goheader to fix the missing offset when // comment.

The problem is that a build directive starts with // so we apply the offset.
This produces a negative position (-1) and then the report will refer to the previous file inside the fileset.

Fixes #5284

@ldez ldez added bug Something isn't working linter: update Update the linter implementation inside golangci-lint labels Jan 2, 2025
@ldez ldez added this to the next milestone Jan 2, 2025
@ldez ldez requested a review from bombsimon January 2, 2025 18:07
@ldez ldez merged commit 8e4b0c3 into golangci:master Jan 2, 2025
15 checks passed
@ldez ldez deleted the fix/goheader branch January 2, 2025 18:36
@ldez ldez modified the milestones: next, v1.63 Jan 2, 2025
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Jan 3, 2025
… (hetznercloud/fleeting-plugin-hetzner!201)

This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golangci/golangci-lint](https://github.com/golangci/golangci-lint) | repository | patch | `v1.63.2` -> `v1.63.3` |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`v1.63.3`](https://github.com/golangci/golangci-lint/releases/tag/v1.63.3)

[Compare Source](golangci/golangci-lint@v1.63.2...v1.63.3)

`golangci-lint` is a free and open-source project built by volunteers.

If you value it, consider supporting us, the [maintainers](https://opencollective.com/golangci-lint) and [linter authors](https://golangci-lint.run/product/thanks/).

We appreciate it! ❤️

For key updates, see the [changelog](https://golangci-lint.run/product/changelog/#&#8203;1633).

#### Changelog

-   [`bb896aa`](golangci/golangci-lint@bb896aa) build(deps): bump github.com/ldez/exptostd from 0.3.0 to 0.3.1 ([#&#8203;5283](golangci/golangci-lint#5283))
-   [`e7a1c9f`](golangci/golangci-lint@e7a1c9f) build(deps): bump github.com/ldez/usetesting from 0.4.1 to 0.4.2 ([#&#8203;5282](golangci/golangci-lint#5282))
-   [`472b9b9`](golangci/golangci-lint@472b9b9) build(deps): bump github.com/shirou/gopsutil/v4 from 4.24.11 to 4.24.12 ([#&#8203;5281](golangci/golangci-lint#5281))
-   [`e1b7346`](golangci/golangci-lint@e1b7346) fix: invalid from position ([#&#8203;5287](golangci/golangci-lint#5287))
-   [`8e4b0c3`](golangci/golangci-lint@8e4b0c3) goheader: skip issues with invalid positions ([#&#8203;5286](golangci/golangci-lint#5286))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45MC4yIiwidXBkYXRlZEluVmVyIjoiMzkuOTAuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

goheader false positive (caused by golangci-lint, not goheader itself)
2 participants