smithery/JamesPrial

staticcheck

Fix staticcheck issues

Installation

$ npx skills add smithery/JamesPrial --skill staticcheck

Also in this package

Other skills from smithery/JamesPrial · top by installs.

npx skills add smithery/JamesPrial

Browse all from smithery/JamesPrial

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,182 B
  • docs SUMMARY.md 41 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

staticcheck

Advanced static analyzer with comprehensive checks.

Install

go install honnef.co/go/tools/cmd/staticcheck@latest

Usage

staticcheck ./...
staticcheck -checks=all ./...

Common Issues

SA1019: Deprecated Function

// Bad
ioutil.ReadFile("file.txt")

// Good
os.ReadFile("file.txt")

SA4006: Unused Value

// Bad
value := compute()
value = other()

// Good
_ = compute()
value := other()

SA9003: Empty Branch

// Bad
if err != nil {
    // TODO
}

// Good - remove or implement
if err != nil {
    return err
}

S1002: Simplify Condition

// Bad
if x == true {
    return true
}

// Good
return x

ST1003: Naming Convention

// Bad
func GetHTTPSUrl() string

// Good
func GetHTTPSURL() string

SA1006: Printf on os.Stderr

// Bad
fmt.Printf("error: %v\n", err)

// Good
fmt.Fprintf(os.Stderr, "error: %v\n", err)

SA4010: Result Not Used

// Bad
append(slice, item)

// Good
slice = append(slice, item)

Configuration

# .staticcheck.conf
checks = ["all", "-ST1000"]