tflint --langserver
fails to start, complains about exec format error in google ruleset
#1859
-
SummaryTrying to use the language server integration for Running the linter, standalone, with this ruleset and configuration works fine. But starting it in LSP mode has it fail with:
I'm using
And it's been installed via Mason in my NeoVIM environment. Mason is starting the server like so:
Note: if I get rid of of my Commandtflint --langserver Terraform ConfigurationN/A -- the server doesn't even start up so there's no Terraform being scanned TFLint Configurationconfig {
plugin_dir = "./.tflint.d/plugins"
}
plugin "google" {
enabled = true
version = "0.25.0"
source = "github.com/terraform-linters/tflint-ruleset-google"
} Output> TFLINT_LOG=debug /Users/ianchesal/.local/share/nvim/mason/bin/tflint --langserver
15:34:04 option.go:71: [DEBUG] CLI Options
15:34:04 option.go:72: [DEBUG] Module: false
15:34:04 option.go:73: [DEBUG] Force: false
15:34:04 option.go:74: [DEBUG] Format:
15:34:04 option.go:75: [DEBUG] Varfiles:
15:34:04 option.go:76: [DEBUG] Variables:
15:34:04 option.go:77: [DEBUG] EnableRules:
15:34:04 option.go:78: [DEBUG] DisableRules:
15:34:04 option.go:79: [DEBUG] Only:
15:34:04 option.go:80: [DEBUG] EnablePlugins:
15:34:04 option.go:81: [DEBUG] IgnoreModules:
15:34:04 langserver.go:28: Starting language server...
15:34:04 config.go:137: [INFO] Load config: .tflint.hcl
15:34:04 config.go:269: [DEBUG] Config loaded
15:34:04 config.go:270: [DEBUG] Module: false
15:34:04 config.go:271: [DEBUG] ModuleSet: false
15:34:04 config.go:272: [DEBUG] Force: false
15:34:04 config.go:273: [DEBUG] ForceSet: false
15:34:04 config.go:274: [DEBUG] DisabledByDefault: false
15:34:04 config.go:275: [DEBUG] DisabledByDefaultSet: false
15:34:04 config.go:276: [DEBUG] PluginDir: ./.tflint.d/plugins
15:34:04 config.go:277: [DEBUG] PluginDirSet: true
15:34:04 config.go:278: [DEBUG] Format:
15:34:04 config.go:279: [DEBUG] FormatSet: false
15:34:04 config.go:280: [DEBUG] Varfiles:
15:34:04 config.go:281: [DEBUG] Variables:
15:34:04 config.go:282: [DEBUG] Only:
15:34:04 config.go:283: [DEBUG] IgnoreModules:
15:34:04 config.go:287: [DEBUG] Rules:
15:34:04 config.go:291: [DEBUG] Plugins:
15:34:04 config.go:293: [DEBUG] google: enabled=true, version=0.25.0, source=github.com/terraform-linters/tflint-ruleset-google
15:34:04 config.go:320: [INFO] The `terraform` plugin block is not found. Enable the plugin `terraform` automatically
15:34:04 discovery.go:90: [DEBUG] Find plugin path: .tflint.d/plugins/github.com/terraform-linters/tflint-ruleset-google/0.25.0/tflint-ruleset-google
15:34:04 discovery.go:54: [INFO] Plugin `google` found
15:34:04 [DEBUG] go-plugin@v1.4.10/client.go:604: starting plugin: path=.tflint.d/plugins/github.com/terraform-linters/tflint-ruleset-google/0.25.0/tflint-ruleset-google args=[".tflint.d/plugins/github.com/terraform-linters/tflint-ruleset-google/0.25.0/tflint-ruleset-google"]
15:34:04 langserver.go:32: Failed to start language server: fork/exec .tflint.d/plugins/github.com/terraform-linters/tflint-ruleset-google/0.25.0/tflint-ruleset-google: exec format error TFLint Version0.48.0 Terraform VersionNo response Operating System
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
And suddenly it's fine. I have no idea why. |
Beta Was this translation helpful? Give feedback.
-
"Exec format error" typically refers to an executable that is malformed for the system where you're trying to run it. The most common cause is attempting to run an executable compiled for a different OS or architecture. The fact that you're overriding |
Beta Was this translation helpful? Give feedback.
"Exec format error" typically refers to an executable that is malformed for the system where you're trying to run it. The most common cause is attempting to run an executable compiled for a different OS or architecture. The fact that you're overriding
plugin_dir
and didn't includetflint --init
in your repro steps makes me suspicious that you had a Linux version of the plugin already installed.