Migrating from tfproviderlint¶
tfsprout is a fork of tfproviderlint. v0.1.0 is a drop-in replacement: the checks, their IDs, their behavior, and their flags are unchanged, and there are no new checks. Only the names and the module path differ.
This page lists everything you have to change.
What changes¶
| tfproviderlint | tfsprout | |
|---|---|---|
| Standard command | tfproviderlint |
tfsprout |
| Extended command | tfproviderlintx |
tfsproutx |
| Go module path | github.com/bflad/tfproviderlint |
github.com/jfrappier/tfsprout |
| GitHub Action | bflad/tfproviderlint-github-action |
jfrappier/tfsprout-github-action |
What does not change¶
- Check IDs.
AT001is stillAT001,S013is stillS013. Nothing was renumbered. - Check behavior. No check reports more or less than it did before.
//lintignore:comments. The suppression syntax and the key names are identical, so you do not need to touch a single ignore comment in your provider. See Ignoring reports.- Per-check flags. Options like
-AT001.ignored-filename-prefixeswork exactly as before. - Removed checks. The checks removed upstream in v0.30.0 are still removed here, and still accept their flags without reporting. See Removed checks.
Migration steps¶
1. Replace the binary¶
Or cmd/tfsproutx if you were using tfproviderlintx. See Install for release binaries and pinning.
2. Update your CI invocation¶
If you invoke the binary directly, change the command name:
If you use go vet:
If you use the GitHub Action, switch to jfrappier/tfsprout-github-action.
3. Update tools.go, if you have one¶
Providers that pin lint tooling through a tools.go build-tagged file need the import path changed:
-_ "github.com/bflad/tfproviderlint/cmd/tfproviderlint"
+_ "github.com/jfrappier/tfsprout/cmd/tfsprout"
Then go mod tidy.
4. Update custom lint tools¶
If you built your own binary from the upstream analyzer packages, change the import paths. The package structure is identical:
-"github.com/bflad/tfproviderlint/passes"
-"github.com/bflad/tfproviderlint/xpasses"
+"github.com/jfrappier/tfsprout/passes"
+"github.com/jfrappier/tfsprout/xpasses"
passes.AllChecks and xpasses.AllChecks have the same names and the same contents. See Implementing a custom lint tool.
Why you might want to migrate¶
Beyond the rename, tfsprout v0.1.1 fixes a crash that affects anyone analyzing a provider with a Go 1.27 toolchain:
This is a golang.org/x/tools incompatibility, not a bug in the checks themselves. See Troubleshooting for the full symptom and the fix.
Verifying the migration¶
Run both tools against the same provider and compare. The findings should be identical:
tfproviderlint ./... > /tmp/before.txt 2>&1
tfsprout ./... > /tmp/after.txt 2>&1
diff /tmp/before.txt /tmp/after.txt
The only expected differences are the tool name in any error messages. If a check reports differently, that is a bug worth filing.