RFC tracker: Linting support
Author: yotttaCreated Jun 25, 2026Updated Sep 15, 2026
Labelsrfcrfc-implementing
This issue is an RFC Tracker of the Built-in linter RFC (rendered version).
The intention of this tracker is to be the first iteration of the built-in linter implementation as requested in https://github.com/opentofu/opentofu/issues/2213. It will handle the initial structure, wiring and basic core linting rules.
The list below contains the work items that reflect the agreed actions from the RFC:
- Basic layers and integration #4337
- Introduce a new diagnostic type
- Based on the content of Lint message rendering and of Lint diagnostics, we will not handle the new type in any specific way right now, but will be handled exactly the same as we handle the warning diagnostics.
- The only difference will be in how we exclude/include diagnostics rendering if are of the new type and do not match the
-lint=flag rules.
- Create a linting rules layer (engine) that can create a generic implementation to run and generate lint diagnostics
- This part should be also responsible with enforcing the rule name format
- Wire everything together (flag + opted-in creation and execution of the rule(s) + rendering)
- Introduce a new diagnostic type
- Core rules implementation
- Create the rest of the proposed basic core rules and create the groups for them:
- depends_on (https://github.com/opentofu/opentofu/pull/4384)
- no-type-variable (#4337)
- quoted reference
- ineffective equality
- impure function usage in resource argument (#4555)
- count == 0 instead of enabled (#4393)
- unused inputs or local values (#4466)
- Create the rest of the proposed basic core rules and create the groups for them:
- Selective running of linting rules #4337
- Create the rules inclusion/exclusion logic
- Use also Lint-enabled Hints to avoid running lint rules if those will be ignored anyway from the rendering
- Create the rules inclusion/exclusion logic
- Testing
- Add unit/integration/e2e tests (#4537)
- Documentation (#4499)
- Document the rules in a new website page
- Document the existing rules and group those by OpenTofu version. This will allow us to create a timeline of when specific core linting rules were introduced
- Mark this as experimental
End goal:
- Have the basic core rules running during the agreed commands (
validate,plan,apply) - The rendering layer prints the linting warnings correctly
Source: opentofu/opentofu