https://github.com/gomatic/yze-go-namedtypes
yze analyzer: flag bare primitive parameter types
https://github.com/gomatic/yze-go-namedtypes
Last synced: 1 day ago
JSON representation
yze analyzer: flag bare primitive parameter types
- Host: GitHub
- URL: https://github.com/gomatic/yze-go-namedtypes
- Owner: gomatic
- License: mit
- Created: 2026-06-28T23:02:00.000Z (4 days ago)
- Default Branch: main
- Last Pushed: 2026-07-01T23:26:52.000Z (1 day ago)
- Last Synced: 2026-07-02T00:18:30.095Z (1 day ago)
- Language: Makefile
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yze-go-namedtypes
A [`yze`](https://github.com/gomatic/yze) analyzer (category `types`) enforcing the gomatic Go standard that function parameters use named domain types rather than bare primitives.
v1 flags parameters of non-method function declarations whose type is a bare predeclared primitive identifier (`int`, `string`, `bool`, …). A named domain type — whether a defined type (`type Count int`) or an alias (`type Celsius = float64`) — is exempt, as are the predeclared `error`/`any` interfaces and imported types. Method receivers (interface-satisfaction carve-outs) and composite types (`[]string`, …) are deferred.
- **Rule:** `yze/namedtypes`
- **Library:** exports `Analyzer` and `Registration` for the [`yze`](https://github.com/gomatic/yze) aggregator and [`stickler`](https://github.com/gomatic/stickler) runner.
- **Binary:** `cmd/yze-go-namedtypes` runs it standalone (`text`/`-json`, and as a `go vet -vettool`).
Built on the [`go-yze`](https://github.com/gomatic/go-yze) framework.