Skip to content

Conversation

@babakks
Copy link
Member

@babakks babakks commented Oct 31, 2025

Fixes #199

Also, fixed godocs as suggested by godoclint, but didn't enable the linter.

Most of it is done by running the official migration tool:

    golangci-lint migrate

and then some polishing.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This is to fix staticcheck's error code QF1006.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
@babakks babakks linked an issue Oct 31, 2025 that may be closed by this pull request
Signed-off-by: Babak K. Shandiz <babakks@github.com>
@babakks babakks requested review from BagToad and Copilot October 31, 2025 11:53
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 pull request improves code documentation and linting configuration across the codebase. The changes primarily focus on adding function names to godoc comments to align with Go documentation best practices, fixing typos, and updating the linting infrastructure.

Key changes:

  • Added function names to godoc comments for better documentation clarity
  • Fixed spelling errors in comments ("wraping" → "wrapping", "searach" → "search")
  • Updated golangci-lint configuration to v2 with refined settings
  • Removed obsolete build constraint syntax and package documentation from test files
  • Simplified loop conditions in BFS traversal logic

Reviewed Changes

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

Show a summary per file
File Description
pkg/term/env_test.go Removed redundant package documentation comment from test file
pkg/term/console_windows.go Removed obsolete // +build constraint syntax
pkg/term/console.go Removed obsolete // +build constraint syntax
pkg/repository/repository.go Added function name to godoc comment
pkg/markdown/markdown.go Added function name and corrected spelling in godoc comment
pkg/jq/jq.go Added function names to godoc comments
pkg/config/errors.go Added function names to godoc comments
pkg/config/config.go Added function names and blank lines to godoc comments
pkg/api/rest_client.go Added function name and blank line to godoc comment
pkg/api/http_client.go Added function name and blank line to godoc comment
pkg/api/graphql_client.go Added function name and blank line to godoc comment
pkg/api/errors.go Added function names to godoc comments
internal/yamlmap/yaml_map.go Added function names, fixed spelling, and simplified loop conditions
internal/git/url.go Added function name to godoc comment
internal/git/remote.go Added function name to godoc comment
gh.go Added function name to godoc comment
.golangci.yml Updated to version 2 with expanded linter settings
.github/workflows/lint.yml Updated golangci-lint-action to v8.0.0 with pinned SHA

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

@@ -1,5 +1,3 @@
// Package term provides information about the terminal that the current process is connected to (if any),
// for example measuring the dimensions of the terminal and inspecting whether it's safe to output color.
package term
Copy link
Member Author

@babakks babakks Oct 31, 2025

Choose a reason for hiding this comment

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

This is redundant since this is a test package, and also the doc is present in pkg/term/env.go:

go-gh/pkg/term/env.go

Lines 1 to 3 in f6d1f60

// Package term provides information about the terminal that the current process is connected to (if any),
// for example measuring the dimensions of the terminal and inspecting whether it's safe to output color.
package term

@BagToad BagToad merged commit 41e1e0d into trunk Oct 31, 2025
16 checks passed
@BagToad BagToad deleted the babakks/upgrade-golangci-lint branch October 31, 2025 16:40
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.

Upgrade Golangci-lint to v2.6

2 participants