Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ err := cli.RunHealth(cli.HealthConfig{
- `github.com/github/gh-aw/pkg/timeutil` — human-readable duration formatting
- `github.com/github/gh-aw/pkg/tty` — terminal detection
- `github.com/github/gh-aw/pkg/types` — shared MCP server configuration types
- `github.com/github/gh-aw/pkg/typeutil` — type conversion helpers for dynamic frontmatter values
- `github.com/github/gh-aw/pkg/fileutil` — file system helpers
- `github.com/github/gh-aw/pkg/gitutil` — Git and GitHub CLI helpers
- `github.com/github/gh-aw/pkg/repoutil` — repository name parsing and normalization
Expand Down
42 changes: 42 additions & 0 deletions pkg/linters/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# linters Package

The `linters` package namespace contains custom static analysis linters used by `gh-aw` quality checks.

## Overview

This package currently provides one custom Go analyzer in the `largefunc` subpackage:

- `largefunc` — reports function bodies that exceed a configurable line-count threshold.

## Public API

### Subpackages

| Subpackage | Description |
|------------|-------------|
| `largefunc` | Custom `go/analysis` analyzer that flags large functions with actionable diagnostics |

## Usage Examples

```go
import "github.com/github/gh-aw/pkg/linters/largefunc"

// Use with multichecker, singlechecker, or custom go/analysis driver.
_ = largefunc.Analyzer
```

## Dependencies

**External**:
- `golang.org/x/tools/go/analysis` — analyzer framework
- `golang.org/x/tools/go/analysis/passes/inspect` — AST inspection support
- `golang.org/x/tools/go/ast/inspector` — efficient AST traversal

## Design Notes

- The package is intentionally organized as a namespace (`pkg/linters/*`) so individual analyzers remain isolated and independently testable.
- `largefunc` exposes a `-max-lines` analyzer flag and defaults to `60` lines (`DefaultMaxLines`).

---

*This specification is automatically maintained by the [spec-extractor](../../.github/workflows/spec-extractor.md) workflow.*