Skip to content

Conversation

@sarlalian
Copy link

Updated golangci-lint from 1.67 to 2.6, and update the config file to the new format.

Config file updated using golangci-lint migrate command

@ankitpokhrel ankitpokhrel requested a review from Copilot December 27, 2025 09:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates golangci-lint from version 1.64.7 to 2.6.2 and migrates the configuration file to the new format. The update also addresses several linting issues flagged by the newer version.

  • Updated golangci-lint version in Makefile from v1.64.7 to v2.6.2
  • Migrated .golangci.yml to version 2 format with reorganized linter and formatter settings
  • Fixed code issues identified by the updated linter, including label usage, logic simplification, and dead code removal

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Makefile Updated golangci-lint installation version from v1.64.7 to v2.6.2
.golangci.yml Migrated configuration to version 2 format with new structure for linters, formatters, and settings
pkg/netrc/reader.go Added labeled break statement to properly exit nested loop and fixed comment formatting
pkg/md/jirawiki/parser.go Removed unreachable code and simplified loop logic with bounds check
internal/view/sprint.go Fixed De Morgan's law application in conditional logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

l = netrcLine{machine: f[i+1]}
case "default":
break
break lines
Copy link
Owner

Choose a reason for hiding this comment

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

The spec says:

‘default’
This is the same as machine name except that default matches any name. 
There can be only one default token, and it must be after all machine tokens. 

In this context, the break statement is intended to exit only the inner loop so that we can evaluate whether the current token corresponds to the default case and then decide whether to continue iterating the outer loop.

Can we just ignore the linting err with //nolint:staticcheck directive for this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants