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
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: A rule reported the wrong thing, or ago failed to run
about: A rule reported the wrong thing, or goago failed to run
title: ''
labels: bug
assignees: ''
Expand All @@ -11,7 +11,7 @@ assignees: ''
<!-- Include the exact command and its output. -->

```
$ ago ./...
$ goago ./...
```

**What you expected**
Expand All @@ -27,12 +27,12 @@ package p

**Which rule**

<!-- If a specific rule applies, name it and paste `ago -explain <rule>`
<!-- If a specific rule applies, name it and paste `goago -explain <rule>`
if the rationale seems to disagree with the behavior you saw. -->

**Environment**

- `ago -version`:
- `goago -version`:
- `go version`:
- OS and architecture:
- `.ago.yml` (if any):
- `.goago.yml` (if any):
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question or discussion
url: https://github.com/agentstation/ago/discussions
url: https://github.com/agentstation/goago/discussions
about: Ask about usage, configuration, or whether a rule fits your codebase.
- name: Security vulnerability
url: https://github.com/agentstation/ago/security/policy
url: https://github.com/agentstation/goago/security/policy
about: Report privately by email. Do not open a public issue.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ assignees: ''

**The problem**

<!-- What are you trying to do that ago makes hard today? -->
<!-- What are you trying to do that goago makes hard today? -->

**What you would like**

**Alternatives you considered**

<!-- Including: is this something a config option, an output format, or your
own analysis.Analyzer built on ago.Rules() could already do? -->
own analysis.Analyzer built on goago.Rules() could already do? -->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rule_proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: rule proposal
assignees: ''
---

<!-- ago is restriction-only. A rule must forbid legal Go, and working around
<!-- goago is restriction-only. A rule must forbid legal Go, and working around
it must never require adding syntax. See CONTRIBUTING.md. -->

**The construct**
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Rule reports a generic method
run: |
set -euo pipefail
go build -o "$RUNNER_TEMP/ago" ./cmd/ago
go build -o "$RUNNER_TEMP/goago" ./cmd/goago
mkdir -p "$RUNNER_TEMP/gm"
cd "$RUNNER_TEMP/gm"
printf 'module gm\n\ngo 1.27\n' > go.mod
Expand All @@ -106,7 +106,7 @@ jobs:
func Plain[R any](b Box, f func(any) R) R { return f(b.v) }
GO
set +e
out=$("$RUNNER_TEMP/ago" -no-config -rules no-generic-methods ./...)
out=$("$RUNNER_TEMP/goago" -no-config -rules no-generic-methods ./...)
status=$?
set -e
echo "$out"
Expand All @@ -128,13 +128,13 @@ jobs:
with:
go-version: stable

- name: Run ago against its own source
- name: Run goago against its own source
run: |
go build -o ago ./cmd/ago
./ago -format github ./...
go build -o goago ./cmd/goago
./goago -format github ./...

- name: Report stale suppressions
run: ./ago -stale-ignores ./...
run: ./goago -stale-ignores ./...

build:
name: Cross-compile
Expand All @@ -154,7 +154,7 @@ jobs:
for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do
echo "building $target"
GOOS=${target%/*} GOARCH=${target#*/} CGO_ENABLED=0 \
go build -o /dev/null ./cmd/ago
go build -o /dev/null ./cmd/goago
done

govulncheck:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:

- name: Dogfood
run: |
go build -o ago ./cmd/ago
./ago ./...
go build -o goago ./cmd/goago
./goago ./...

release:
name: Release
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Binaries
/ago
/goago
/dist/
/build/

# Test and coverage output
*.test
*.out
coverage.txt
ago.sarif
goago.sarif

# Generated Go fuzz corpus. Seed inputs live in f.Add calls.
testdata/fuzz/
Expand Down
6 changes: 3 additions & 3 deletions .ago.yml → .goago.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ago rule policy. See https://github.com/agentstation/ago#rules
# Run "ago -list" for the rule set this binary supports.
# goago rule policy. See https://github.com/agentstation/goago#rules
# Run "goago -list" for the rule set this binary supports.

enable:
- no-self-referential-constraints # A generic type may not name itself in its own type parameter list.
Expand All @@ -20,7 +20,7 @@ enable:

# no-generic-decls # No type parameters on any func or type declaration.

- no-invalid-ignore # Every //ago:ignore must name a known rule and give a reason.
- no-invalid-ignore # Every //goago:ignore must name a known rule and give a reason.

- no-dot-import # Import . "pkg" is forbidden.

Expand Down
39 changes: 20 additions & 19 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
version: 2
project_name: goago

before:
hooks:
- go mod verify
- go mod tidy -diff

builds:
- id: ago
binary: ago
main: ./cmd/ago
- id: goago
binary: goago
main: ./cmd/goago
env:
- CGO_ENABLED=0
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
- -s -w
- -X github.com/agentstation/ago.Version={{ .Version }}
- -X github.com/agentstation/goago.Version={{ .Version }}
goos:
- linux
- darwin
Expand All @@ -26,9 +27,9 @@ builds:
- arm64

archives:
- id: ago
- id: goago
ids:
- ago
- goago
formats: [tar.gz]
format_overrides:
- goos: windows
Expand All @@ -42,15 +43,15 @@ archives:
files:
- README.md
- CHANGELOG.md
- ago.schema.json
- goago.schema.json
- COPYRIGHT
- LICENSE-MIT
- LICENSE-APACHE

homebrew_casks:
- name: ago
- name: goago
ids:
- ago
- goago
repository:
owner: agentstation
name: homebrew-tap
Expand All @@ -64,15 +65,15 @@ homebrew_casks:
commit_author:
name: "GitHub Actions"
email: "actions@github.com"
commit_msg_template: "Update ago to {{ .Tag }}"
homepage: https://github.com/agentstation/ago
commit_msg_template: "Update goago to {{ .Tag }}"
homepage: https://github.com/agentstation/goago
description: Linter that enforces one way to write Go
binaries:
- ago
- goago
custom_block: |
postflight_steps do
on_macos do
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{staged_path}}" }}/ago"], sudo: false
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{staged_path}}" }}/goago"], sudo: false
end
end

Expand Down Expand Up @@ -125,15 +126,15 @@ changelog:
release:
github:
owner: agentstation
name: ago
name_template: "ago {{ .Tag }}"
name: goago
name_template: "goago {{ .Tag }}"
header: |
`ago` enforces one way to write Go across a codebase. Developers, coding
`goago` enforces one way to write Go across a codebase. Developers, coding
agents, and CI use the same configurable Go subset.

```sh
go get -tool github.com/agentstation/ago/cmd/ago@latest
go tool ago ./...
go get -tool github.com/agentstation/goago/cmd/goago@latest
go tool goago ./...
```

A config file is optional. The pinned version supplies the default policy.
Expand All @@ -144,6 +145,6 @@ release:
Verify downloaded archives against `checksums.txt`. Each archive ships an
SBOM alongside it.
footer: |
**Full changelog:** https://github.com/agentstation/ago/compare/{{ .PreviousTag }}...{{ .Tag }}
**Full changelog:** https://github.com/agentstation/goago/compare/{{ .PreviousTag }}...{{ .Tag }}
prerelease: auto
make_latest: '{{ if .Prerelease }}false{{ else }}true{{ end }}'
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ago agent instructions
# goago agent instructions

`ago` is a restriction-only Go linter. Every rule rejects a legal Go construct.
`goago` is a restriction-only Go linter. Every rule rejects a legal Go construct.
No rule may add syntax, rewrite code, or change semantics.

## Technical writing
Expand All @@ -24,12 +24,12 @@ Use `GLOSSARY.md` for developer-facing prose. Run the installed
- `rule.go` is the registry. `rule_<topic>.go` holds the analyzers.
- Build every analyzer with `newAnalyzer`. Report through `checkPass.reportf`.
Never use `pass.Report`. `reportf` is what applies suppression.
- `check.go` is the driver. `config.go` is the `.ago.yml` schema.
- `check.go` is the driver. `config.go` is the `.goago.yml` schema.
`ignore.go` is the suppression index. `report.go` and `sarif.go` are the
output formats.
- Analyzers run concurrently. Cross-analyzer state needs `sync/atomic`.
- Rule metadata is public interface. `Name` is the doc anchor and the config
key. `ago -explain` prints the `Rationale` string verbatim.
key. `goago -explain` prints the `Rationale` string verbatim.

## Evidence

Expand Down
21 changes: 17 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ passed.

## [Unreleased]

## [0.3.0] - 2026-09-11

### Changed

- Rename the repository, Go module, package, command, and golangci-lint plugin
to `goago`, pronounced "go ago".
- Use `.goago.yml`, `.goago.yaml`, `goago.schema.json`, and `//goago:ignore`
for new policies and suppressions. Existing names still work during migration.
- Reject competing policy files in the same directory instead of selecting one silently.
- Rename release archives, the Homebrew cask, and the Agent Skill to `goago`.
- Document migration in [docs/migration.md](docs/migration.md).

## [0.2.0] - 2026-08-30

### Added
Expand Down Expand Up @@ -116,7 +128,8 @@ Relative to the unreleased single-file prototype:
unreported. It now uses `types.Info`.
- Passing the same package twice produced duplicate findings.

[Unreleased]: https://github.com/agentstation/ago/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/agentstation/ago/releases/tag/v0.2.0
[0.1.1]: https://github.com/agentstation/ago/releases/tag/v0.1.1
[0.1.0]: https://github.com/agentstation/ago/releases/tag/v0.1.0
[Unreleased]: https://github.com/agentstation/goago/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/agentstation/goago/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/agentstation/goago/releases/tag/v0.2.0
[0.1.1]: https://github.com/agentstation/goago/releases/tag/v0.1.1
[0.1.0]: https://github.com/agentstation/goago/releases/tag/v0.1.0
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing to ago
# Contributing to goago

Thanks for your interest. This document covers how to build, test, and propose
changes. New rules have a higher bar than ordinary code.

## Build and test

```sh
make build # build ./cmd/ago
make build # build ./cmd/goago
make test # go test -race ./...
make lint # gofmt, go vet, golangci-lint
make govulncheck # scan the module graph
Expand All @@ -25,14 +25,14 @@ skill. Set `TECHNICAL_WRITING` if the helper is not at

## Proposing a rule

`ago` is restriction-only. A rule must forbid a construct that is legal Go.
`goago` is restriction-only. A rule must forbid a construct that is legal Go.
It must never require adding syntax to work around it. A proposal needs four
things.

**A rationale in terms of the reader.** Say what the construct costs someone
reading the code cold. A second place to look. A scroll upward. An identifier
whose origin is not local. "It is confusing" is not a rationale. The rationale
ships in the binary, so `ago -explain <rule>` prints it verbatim. Write it for
ships in the binary, so `goago -explain <rule>` prints it verbatim. Write it for
somebody who just hit the finding and wants to know whether to care.

**An honest default.** A rule is on by default only when the construct has a
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ago is dual-licensed under either of
goago is dual-licensed under either of

* Apache License, Version 2.0 (see LICENSE-APACHE, or
http://www.apache.org/licenses/LICENSE-2.0)
Expand Down
12 changes: 6 additions & 6 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ when they match a row.

| Term | Definition | Avoid | Status | Evidence |
|---|---|---|---|---|
| ago | The restriction-only Go linter this repository builds | | approved | README.md |
| goago | The restriction-only Go linter this repository builds | | approved | README.md |
| analyzer ident | The hyphen-free `Analyzer.Name` that `go/analysis` requires | | approved | rule.go |
| coding agent | A program that drives `ago` through its command, JSON catalogue, or exit status | | approved | README.md |
| coding agent | A program that drives `goago` through its command, JSON catalogue, or exit status | | approved | README.md |
| F-bounded | A type parameter that appears inside its own constraint | | approved | README.md, docs/stdlib-survey.md |
| finding | One reported violation of a rule | | approved | finding.go, README.md |
| fixture | A `testdata` package that records expected findings and non-findings | | approved | CONTRIBUTING.md |
| golangci-lint | The Go linter runner that loads `ago` as a module plugin | | approved | README.md, plugin/golangci/plugin.go |
| golangci-lint | The Go linter runner that loads `goago` as a module plugin | | approved | README.md, plugin/golangci/plugin.go |
| meta-name | The `enable` values `default` and `all` | | approved | README.md, config.go |
| naked return | A `return` with no operands in a function with named results | | approved | README.md, rule_declarations.go |
| near-miss | A neighbouring construct the rule must not report | | approved | CONTRIBUTING.md |
| non-finding | A construct a fixture includes because the rule must not report it | | approved | CONTRIBUTING.md, AGENTS.md |
| non-test | A `.go` file whose name does not end in `_test.go` | | approved | docs/stdlib-survey.md |
| off by default | A rule that is disabled until configuration enables it | off-by-default | approved | README.md, CONTRIBUTING.md |
| on by default | A rule that is enabled when no configuration selects a rule set | | approved | README.md |
| rationale | The explanation `ago -explain` prints for a rule | | approved | rule.go, README.md |
| rationale | The explanation `goago -explain` prints for a rule | | approved | rule.go, README.md |
| restriction-only | Rejects legal Go constructs. Does not add syntax, rewrite code, or change semantics | | approved | README.md, AGENTS.md |
| rule | One named restriction paired with a `go/analysis` analyzer | | approved | rule.go |
| SARIF | Static Analysis Results Interchange Format 2.1.0 | | approved | README.md, sarif.go |
| stale ignore | An `//ago:ignore` directive that suppressed no finding in the run | | approved | README.md, check.go |
| stale ignore | An `//goago:ignore` directive that suppressed no finding in the run | | approved | README.md, check.go |
| standard library | The Go standard library under `GOROOT/src` | stdlib | approved | README.md, docs/stdlib-survey.md |
| suppression | An `//ago:ignore` or `//ago:ignore-file` directive | | approved | README.md, ignore.go |
| suppression | An `//goago:ignore` or `//goago:ignore-file` directive | | approved | README.md, ignore.go |
Loading
Loading