Skip to content

fix new staticcheck failure reported by golangci-lint v2.10.1#888

Merged
tariq1890 merged 1 commit intomainfrom
fix-staticcheck
Feb 23, 2026
Merged

fix new staticcheck failure reported by golangci-lint v2.10.1#888
tariq1890 merged 1 commit intomainfrom
fix-staticcheck

Conversation

@tariq1890
Copy link
Copy Markdown
Contributor

@tariq1890 tariq1890 commented Feb 19, 2026

This PR addresses the following lint failure:

Error: cmd/compute-domain-daemon/dnsnames.go:179:3: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
  		newHostsContent.WriteString(fmt.Sprintf("%s\t%s\n", ip, dnsName))
  		^
  1 issues:
  * staticcheck: 1

Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
Copy link
Copy Markdown
Contributor

@shivamerla shivamerla left a comment

Choose a reason for hiding this comment

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

LGTM

@tariq1890 tariq1890 merged commit f40f9d9 into main Feb 23, 2026
17 checks passed
@tariq1890 tariq1890 deleted the fix-staticcheck branch February 23, 2026 17:02
@klueska
Copy link
Copy Markdown
Contributor

klueska commented Feb 23, 2026

This should not have been merged without a milestone, a proper set of labels, and an initiative set for it.

@tariq1890
Copy link
Copy Markdown
Contributor Author

@klueska I was not aware. Please note that this change is needed to unblock our CI since golangci-lint has started complain (we don't pin the golangci-lint version in this repo)

I assume this is for release note purposes?

@tariq1890 tariq1890 added the maintenance/chores issue/pr for maintenance, release work, code cleanup, chores label Feb 23, 2026
@tariq1890 tariq1890 added this to the v26.4.0 milestone Feb 23, 2026
@jgehrcke
Copy link
Copy Markdown
Contributor

Of course this was an important change. I want to express my strong opinions about process here.

this change is needed to unblock our CI since golangci-lint has started complain (we don't pin the golangci-lint version in this repo)

Here's how I always prefer to do this. Based on an ever-repeating situation across companies and teams. I dislike urgent PRs that

  • don't themselves describe how urgent they are, and why
  • don't feed into a data collection system (issues, with labels)

Especially when there's multiple people watching a repo across timezones. Slack threads behind the scenes don't count for context. Issue tracker is the source of truth, in particular in the heat of the moment.

Here, an issue should point out that main is broken. That's how we should start! :) We have a label for that:

image

Example: #688

Then, the PR can link to the issue.

we don't pin the golangci-lint version in this repo

My strong opinion: we should! For exactly this reason. Even when trying hard, a CI pipeline is never static over time (degrades with time). But still, one should try hard to eliminate individual moving targets one by one. To me, pinning a linter to a specific version is a rather obvious decision (it should of course still be bumped regularly, just at a self-chosen point in time, with control).

@jgehrcke jgehrcke added ci/testing issue/PR related to CI and/or testing P0 bug that must be addressed with urgency, devprod blocker (such as "broken main"). kind/bug Categorizes issue or PR as related to a bug. labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/testing issue/PR related to CI and/or testing kind/bug Categorizes issue or PR as related to a bug. maintenance/chores issue/pr for maintenance, release work, code cleanup, chores P0 bug that must be addressed with urgency, devprod blocker (such as "broken main").

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants