Helper for golangci-lint
Project description
Lintme
A convenience wrapper around golangci-lint that discovers Go modules in your
workspace and runs the linter per module with zero configuration fuss.
Overview
In a Go workspace (go.work) with many modules, running golangci-lint
requires cd-ing into each module directory and invoking it separately.
lintme automates that loop — one command from anywhere in the workspace lints
everything.
Module discovery works with workspaces: when lintme finds a go.work file,
it lints every module listed under a use directive, in order. When no
go.work exists, it walks up from the current directory until it finds a
go.mod and lints that single module.
For each module, lintme also walks up the directory tree to find the nearest
.golangci.yaml (or an equivalent config file), so each module can carry its
own linter config. Output streams in real time — nothing buffers it.
Requirements
golangci-lintinstalled and available onPATH- Go 1.26 or later
Installation
go install github.com/StevenACoffman/lintme@latest
This places the lintme binary in $GOPATH/bin or $GOBIN. Ensure that
directory is on your PATH.
Commands
Running bare lintme runs lintme run — no subcommand needed for the common case.
lintme run (Default)
Lint all modules in the workspace.
# Lint all modules, applying --fix (default)
lintme
# Check only — do not modify files
lintme --no-fix
# Report only issues introduced since a given commit
lintme --new-from-rev=main
# Forward extra flags to every golangci-lint invocation
lintme -- --timeout=5m
lintme --no-fix -- --timeout=5m --out-format=json
| Flag | Default | Description |
|---|---|---|
--no-fix |
off | Skip --fix; report issues without modifying files |
--new-from-rev=<rev> |
— | Pass --new-from-rev=<rev> to every golangci-lint invocation; golangci-lint reports only issues introduced since <rev> |
lintme version
Print build and version information.
lintme version # human-readable table
lintme version --json # machine-readable JSON
Module and Config Discovery
Module Discovery
lintme walks up from the current directory looking for a go.work file. When
it finds one, it lints every module listed under a use directive in
declaration order. When no go.work exists, it continues walking up until it
finds a go.mod and lints that single module.
Config Discovery
For each module, lintme walks up from the module directory looking for a
config file in this priority order:
.golangci.yml.golangci.yaml.golangci.toml.golangci.json
The output header for each module shows the resolved path. When no config file
exists, golangci-lint runs without --config and applies its own defaults.
Environment Variables
Every flag can also be set via a LINTME_-prefixed environment variable. The
mapping rule: prepend LINTME_, uppercase, replace dashes with underscores.
| Flag | Environment variable |
|---|---|
--no-fix |
LINTME_NO_FIX=true |
--new-from-rev |
LINTME_NEW_FROM_REV=<rev> |
Flags on the command line always take precedence over environment variables.
Output
==> ./services/auth (github.com/example/myapp/services/auth) config: ./services/auth/.golangci.yaml
... golangci-lint output ...
==> ./services/payments (github.com/example/myapp/services/payments) config: no config
... golangci-lint output ...
2/2 modules passed
When a module fails:
==> ./services/payments (github.com/example/myapp/services/payments) config: no config
./services/payments/handler.go:42:9: unused variable (deadcode)
FAIL ./services/payments: golangci-lint: exit status 1
1/2 modules passed
Failing modules do not stop remaining modules from linting. lintme exits
non-zero if any module fails.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All modules passed |
| 1 | One or more modules failed |
CI Integration
Use --no-fix in CI so the linter reports issues without modifying files.
- name: Lint
run: lintme --no-fix
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lintmego-0.2.0-py3-none-win_arm64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-win_arm64.whl
- Upload date:
- Size: 7.0 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d975763c747fbfc475e90024db493ac6c441169e52186670e57f82258fcee1e9
|
|
| MD5 |
89f0f30e6ddfc485c8136d544e5ecdbb
|
|
| BLAKE2b-256 |
bf7af965e1bef702eb899f2ba6f8fd52a1708d44a1649f7f49c23fc7e49eecb6
|
File details
Details for the file lintmego-0.2.0-py3-none-win_amd64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 7.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03dd301b1b6a9716db45dfb3027eaae4b3cabb38c7f761f18cf92f23ebd32bde
|
|
| MD5 |
feacaa021c05a6b9e68d69e26d1aff5b
|
|
| BLAKE2b-256 |
7ac2e173fa2561334a0d7d48369afd8827745e06c9db89179234a351a3979c0f
|
File details
Details for the file lintmego-0.2.0-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f2893daa578f1c82116910d631895eee97f4082ebfba6032bb041cb716f1100
|
|
| MD5 |
e43506902546a04746289ab2979e1888
|
|
| BLAKE2b-256 |
8c20558c19cff8badd4066b886756437d86da95106f5749a52122fb0c6d13b7a
|
File details
Details for the file lintmego-0.2.0-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 6.9 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5874fa006ab4d26670fd27bd56f29fbde7acd6ed5d390bb9017b90ce169eac5f
|
|
| MD5 |
df22d9424637ce5a527f04ba83da8c5f
|
|
| BLAKE2b-256 |
eb346f0c09e5395d01313a16059f2d174eee7dff122ef945d5938651cc22710c
|
File details
Details for the file lintmego-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f1db8371b9465e907138373c855911e05baa0ddf2adf3402723935b71138c9f
|
|
| MD5 |
9b5830cfcbdef7da653a2ee699359b89
|
|
| BLAKE2b-256 |
52c6759f9d82025e2bdb691bd509cfec9a3b83d1056e96a0a7528103dfc1da4c
|
File details
Details for the file lintmego-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d2f3de1f559a4f27213f4817228a31e08f540781323715280f81e1e0bb1ec0f
|
|
| MD5 |
d2ad94011b135ac6d85dd7fcc54eb393
|
|
| BLAKE2b-256 |
4a5fc5de736bf6c13ad64b8ee717ac5024e6c47998f4fd7076a67290cd204a95
|
File details
Details for the file lintmego-0.2.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 7.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342c2e9213ea3661c6415a17b9dbf6f164d058c2893aadbfb5e3a9c76ffce3d5
|
|
| MD5 |
ea9022cf2ef368ce7193dc5f029478a4
|
|
| BLAKE2b-256 |
c10c36b5146f2df4c40791f54f8547928cb973c164e66393554f5ed9e6eb3849
|
File details
Details for the file lintmego-0.2.0-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: lintmego-0.2.0-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 7.6 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: Go-http-client/2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0538b7a5416dbfe40fc03c2074bfd4902eb4c9f1bf767f35e16950d6d5d9d989
|
|
| MD5 |
3d247464fa771cd6b117517f0e9bec3c
|
|
| BLAKE2b-256 |
42feb665da5d513e22e830c06b8d6fa49c14736590efacddeaf781a3bec3a427
|