fix(lint): resolve errcheck and unparam violations
Fixes CI lint failures by handling unchecked error returns and marking unused parameters with blank identifiers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
5d554a616a
commit
b9e8be4352
@@ -95,7 +95,7 @@ func runDown(cmd *cobra.Command, args []string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot proceed: %w", err)
|
return fmt.Errorf("cannot proceed: %w", err)
|
||||||
}
|
}
|
||||||
defer lock.Unlock()
|
defer func() { _ = lock.Unlock() }()
|
||||||
}
|
}
|
||||||
allOK := true
|
allOK := true
|
||||||
|
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ func runInstall(cmd *cobra.Command, args []string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func createMayorCLAUDEmd(mayorDir, townRoot string) error {
|
func createMayorCLAUDEmd(mayorDir, _ string) error {
|
||||||
// Create a minimal bootstrap pointer instead of full context.
|
// Create a minimal bootstrap pointer instead of full context.
|
||||||
// Full context is injected ephemerally by `gt prime` at session start.
|
// Full context is injected ephemerally by `gt prime` at session start.
|
||||||
// This keeps the on-disk file small (<30 lines) per priming architecture.
|
// This keeps the on-disk file small (<30 lines) per priming architecture.
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ func warnIfTownRootOffMain() {
|
|||||||
// checkBeadsDependency verifies beads meets minimum version requirements.
|
// checkBeadsDependency verifies beads meets minimum version requirements.
|
||||||
// Skips check for exempt commands (version, help, completion).
|
// Skips check for exempt commands (version, help, completion).
|
||||||
// Deprecated: Use persistentPreRun instead, which calls CheckBeadsVersion.
|
// Deprecated: Use persistentPreRun instead, which calls CheckBeadsVersion.
|
||||||
func checkBeadsDependency(cmd *cobra.Command, args []string) error {
|
func checkBeadsDependency(cmd *cobra.Command, _ []string) error {
|
||||||
// Get the root command name being run
|
// Get the root command name being run
|
||||||
cmdName := cmd.Name()
|
cmdName := cmd.Name()
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ func checkStaleBinaryWarning() {
|
|||||||
|
|
||||||
if info.IsStale {
|
if info.IsStale {
|
||||||
staleBinaryWarned = true
|
staleBinaryWarned = true
|
||||||
os.Setenv("GT_STALE_WARNED", "1")
|
_ = os.Setenv("GT_STALE_WARNED", "1")
|
||||||
|
|
||||||
msg := fmt.Sprintf("gt binary is stale (built from %s, repo at %s)",
|
msg := fmt.Sprintf("gt binary is stale (built from %s, repo at %s)",
|
||||||
version.ShortCommit(info.BinaryCommit), version.ShortCommit(info.RepoCommit))
|
version.ShortCommit(info.BinaryCommit), version.ShortCommit(info.RepoCommit))
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ func (c *PrimingCheck) Run(ctx *CheckContext) *CheckResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// checkAgentPriming checks priming configuration for a specific agent.
|
// checkAgentPriming checks priming configuration for a specific agent.
|
||||||
func (c *PrimingCheck) checkAgentPriming(townRoot, agentDir, agentType string) []primingIssue {
|
func (c *PrimingCheck) checkAgentPriming(townRoot, agentDir, _ string) []primingIssue {
|
||||||
var issues []primingIssue
|
var issues []primingIssue
|
||||||
|
|
||||||
agentPath := filepath.Join(townRoot, agentDir)
|
agentPath := filepath.Join(townRoot, agentDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user