fix: in some cases golangci-lint will fail parsing a comment with a URL#888
Merged
jakobmoellerdev merged 2 commits intoSep 17, 2025
Merged
Conversation
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
jakobmoellerdev
approved these changes
Sep 16, 2025
fabianburth
approved these changes
Sep 17, 2025
matthiasbruns
pushed a commit
to matthiasbruns/open-component-model
that referenced
this pull request
Sep 18, 2025
…RL (open-component-model#888) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it For _whatever_ reason... my local linter is failing with the following error: ``` ➜ /Users/skarlso/goprojects/sap/open-component-model/tmp/bin/golangci-lint run \ --timeout 10m \ --config=/Users/skarlso/goprojects/sap/open-component-model/.github/config/golangci.yml ../../cli/cmd/get/component-version/cmd.go:148:2: directive `//nolint:staticcheck // no replacement for resolvers available yet (https://github.com/open-component-model/ocm-project/issues/575)` is unused for linter "staticcheck" (nolintlint) //nolint:staticcheck // no replacement for resolvers available yet (open-component-model/ocm-project#575) ^ 1 issues: * nolintlint: 1 ``` I tried to use a different shell a different linter a different config... but everything is the same. I have no local overrides, no local configs, no changes. However, once I remove these parentheses around the URL everything works fine. We tried to debug this together on the daily, but there seems to be nothing out of the order. Once this fix is applied: ``` ➜ /Users/skarlso/goprojects/sap/open-component-model/tmp/bin/golangci-lint run \ --timeout 10m \ --config=/Users/skarlso/goprojects/sap/open-component-model/.github/config/golangci.yml 0 issues. ``` Everything works fine. #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
For whatever reason... my local linter is failing with the following error:
I tried to use a different shell a different linter a different config... but everything is the same. I have no local overrides, no local configs, no changes.
However, once I remove these parentheses around the URL everything works fine.
We tried to debug this together on the daily, but there seems to be nothing out of the order.
Once this fix is applied:
Everything works fine.
Which issue(s) this PR fixes