Static analysis tool for Terraform Provider code, offering linting checks for acceptance tests, resources, schemas, and validations.
tfproviderlint is a static analysis tool built for Terraform Provider developers. It performs linting on provider codebases to identify issues related to acceptance tests, resource definitions, schema configurations, and validation functions. The tool helps enforce best practices and prevent common errors in Terraform Plugin SDK implementations.
Terraform Provider developers and maintainers who write Go code using the Terraform Plugin SDK and want to ensure code quality and adherence to SDK conventions.
Developers choose tfproviderlint because it provides provider-specific linting that generic Go linters don't offer, with checks tailored to Terraform Plugin SDK patterns and best practices. Its extensible architecture allows teams to add custom checks for their specific provider requirements.
Terraform Provider Lint Tool
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers over 50 standard checks tailored to Terraform Plugin SDK patterns, such as schema validation and acceptance test structure, which generic linters miss.
Includes a -fix flag for automatic correction of certain issues, reducing manual refactoring effort, as shown in the usage examples.
Built on go/analysis, allowing custom check implementations and tool extensions, detailed in the 'Implementing a Custom Lint Tool' section.
Supports multiple installation methods including Docker, Homebrew, and a GitHub Action, making it easy to integrate into various workflows.
Requires switching between tfproviderlint and tfproviderlintx for extra checks, adding complexity to the linting process and setup.
Has removed checks in past versions (e.g., v0.30.0), which can break existing linting configurations and require updates, as noted in the README.
Exclusively supports Go-based Terraform Providers, making it unsuitable for providers implemented in other programming languages or custom frameworks.