-
Notifications
You must be signed in to change notification settings - Fork 379
docs: windows plugin development #2334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
||
Thus, with the configuration above where the plugin name is "foo", the executable must be named tflint-ruleset-foo (or tflint-ruleset-foo.exe on Windows). So you should move the binary into the plugin directory in advance. | ||
|
||
**Important for Windows Users:** On Windows, make sure to place the executable directly into the plugins folder (e.g. C:\Users\\[username]\\.tflint.d\plugins\) without using any subfolders. This direct placement is required for TFLint to detect and load the plugin correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sentence necessary? I don't think there is any difference between Windows and Unix, except for the .exe
extension in the file name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree can remove "Important for Windows Users:" the other clarification sentence would have helped me to figure out my problem faster. WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think this sentence should be removed altogether.
I understand that your misunderstanding arose because it was unclear in the original sentence whether "(For instance, ~/.tflint.d/plugins/tflint-ruleset-[name]
)" referred to "the plugin directory" or "binary in the plugin directory".
Since the revised sentence does not contain this ambiguity, I do not think it is necessary to emphasize this issue so much.
@@ -104,7 +104,11 @@ plugin "foo" { | |||
} | |||
``` | |||
|
|||
When the plugin is enabled, TFLint invokes the `tflint-ruleset-[name]` (`tflint-ruleset-[name].exe` on Windows) binary in the plugin directory (For instance, `~/.tflint.d/plugins/tflint-ruleset-[name]`). So you should move the binary into the directory in advance. | |||
When enabled, TFLint looks for the plugin binary following the pattern tflint-ruleset-\[name] (or tflint-ruleset-\[name].exe on Windows) directly in your plugins folder (e.g., ~/.tflint.d/plugins/ on Unix-like systems or C:\Users\\[username]\\.tflint.d\plugins\ on Windows). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, to be honest, there is an issue with the location of files in Windows...
It should probably be placed in %APPDATA%/tflint.d/plugins
like Terraform.
https://developer.hashicorp.com/terraform/cli/config/config-file#implied-local-mirror-directories
Updating docs for plugin development. Docs seem to be wrong for windows systems.
.tflint.hcl
Placing local plugin into directory defined in docs

tflint debug
Placing local plugin directly into to the plugin folder without further subfolders

tflint debug
using tflint 0.58.0
