cfn-lint-visual-studio-code
cfn-lint-visual-studio-code copied to clipboard
cfnLint.path doesn't resolve ${workspaceFolder}
Hi, I was having a hard time getting this extension to work until I found https://github.com/awslabs/aws-cfn-lint-visual-studio-code/issues/21.
> Determined this file is a CloudFormation Template. file:///Users/user/test/test.yml. Found the string AWSTemplateFormatVersion
> running............. ${workspaceFolder}/venv/bin/cfn-lint --format,json,--template,/Users/user/test/test.yml
> Unable to start cfn-lint (Error: spawn ${workspaceFolder}/venv/bin/cfn-lint ENOENT). Is cfn-lint installed correctly?
After doing a which cfn-lint, grabbing the results, and making that the value of `cfnLint.Path, things started working.
Determined this file is a CloudFormation Template. file:///Users/user/test/test.yml. Found the string AWSTemplateFormatVersion
running............. /Users/user/test/venv/bin/cfn-lint --format,json,--template,/Users/user/test/test.yml
Looks like ${workspaceFolder} isn't being resolved. Is this the expected behavior?
Hey there, thanks for raising this!
I don't think we currently process VS Code Predefined Variables in our settings, so your resolution is correct. If it's alright with you, I'm going to treat this as an enhancement to add the ability to use VS Code predefined variables (as defined here: https://code.visualstudio.com/docs/editor/variables-reference) when defining linter settings.
Sure thing, thanks!
This is the best I can do for now. Looks like this is a common issue when using settings. https://github.com/Microsoft/vscode/issues/2809