Skip to content

fix: in some cases golangci-lint will fail parsing a comment with a URL#888

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
Skarlso:golangci-lint-ignore-failure
Sep 17, 2025
Merged

fix: in some cases golangci-lint will fail parsing a comment with a URL#888
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
Skarlso:golangci-lint-ignore-failure

Conversation

@Skarlso

@Skarlso Skarlso commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

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 (https://github.com/open-component-model/ocm-project/issues/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

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso requested a review from a team as a code owner September 16, 2025 07:49
@github-actions github-actions Bot added kind/bugfix Bug size/xs Extra small labels Sep 16, 2025
@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) September 17, 2025 10:50
@jakobmoellerdev jakobmoellerdev merged commit 7980114 into open-component-model:main Sep 17, 2025
19 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugfix Bug size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants