cfn-lint-visual-studio-code icon indicating copy to clipboard operation
cfn-lint-visual-studio-code copied to clipboard

cfnLint.path doesn't resolve ${workspaceFolder}

Open bwilder opened this issue 7 years ago • 3 comments

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?

bwilder avatar Oct 29 '18 12:10 bwilder

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.

cmmeyer avatar Oct 30 '18 18:10 cmmeyer

Sure thing, thanks!

bwilder avatar Oct 31 '18 12:10 bwilder

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

kddejong avatar Feb 12 '19 04:02 kddejong