Skip to content

Experimental: TFLint plugin SDK for building custom rules

License

Notifications You must be signed in to change notification settings

richardTowers/tflint-plugin-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFLint plugin SDK

Build Status GitHub release go.dev reference License: MPL 2.0

TFLint plugin SDK for building custom rules.

NOTE: This plugin system is experimental. This means that API compatibility is frequently broken.

Requirements

  • TFLint v0.24+
  • Go v1.15

Usage

Please refer to tflint-ruleset-template for an example plugin implementation using this SDK.

For more details on the API, see tflint and helper packages on pkg.go.dev.

Architecture

architecture

This plugin system uses go-plugin. TFLint launches the plugin as a sub-process and communicates with the plugin over RPC. The plugin acts as a server, while TFLint acts as a client that sends inspection requests to the plugin.

On the other hand, the plugin sends various requests to a server (TFLint) to get detailed runtime contexts (e.g. variables and expressions). This means that TFLint and plugins can act as both a server and a client.

About

Experimental: TFLint plugin SDK for building custom rules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%