Skip to content

Write production-ready Go code with confidencegolint-sl

32 analyzers enforcing code quality, safety, architecture, and observability patterns learned from production systems.

Why golint-sl?

Patterns learned from building production systems at scale.

Analyzer Categories

Organized by the problems they solve

Quick Start

Get up and running in under a minute. golint-sl runs as a golangci-lint module plugin.

1. Add .custom-gcl.yml to your project:

version: v2.8.0

plugins:
  - module: 'github.com/spechtlabs/golint-sl'
    version: v0.1.0

2. Build the custom binary and run:

golangci-lint custom
./custom-gcl run ./...

Looking for more details?

See the Installation Guide for full setup instructions and configuration.

What Makes golint-sl Different?

Most linters focus on syntax and formatting. golint-sl focuses on production readiness:

Wide Events Over Scattered Logs - One log line per request with 50+ structured fields beats 15 scattered logs

// Bad: Scattered logs throughout the function
log.Info("starting request")
log.Info("fetched user")
log.Info("updated database")

// Good: Single wide event at the end
logger.Info("request completed",
    zap.String("request_id", reqID),
    zap.String("user_id", userID),
    zap.Duration("duration", time.Since(start)),
    zap.Int("items_processed", count),
)

Nil Checks at Function Boundaries - Catch nil pointer panics before they reach production

Kubernetes Reconciler Patterns - Ensure your operators follow best practices

Integration

golint-sl integrates with your existing workflow:

IntegrationDescription
GitHub ActionsRun on every PR with clear annotations
Pre-commit HooksCatch issues before they're committed
golangci-lintConfiguration and setup details