KamasamaK / vscode-cflint

An extension to integrate CFLint into Visual Studio Code.
MIT License
17 stars 9 forks source link

Use relative path to define "cflint.jarPath" #21

Open gquittet opened 4 years ago

gquittet commented 4 years ago

Problem

At the moment, I can't make cflint working with a relative path like this

~/.local/share/cflint/cflint.jar

or

$XDG_DATA_HOME/cflint/cflint.jar

or

$HOME/me/.local/share/cflint/cflint.jar

I need to use this path:

/Users/me/.local/share/cflint/cflint.jar

And the problem is that I've the same config on my MacBook Pro than my ThinkPad with ArchLinux.

If this problem take you too much time I can look at it and make a PR.

sfeldkamp commented 2 years ago

Supporting variables in the extension might be the best way, if the path is under the workspace root.

https://code.visualstudio.com/docs/editor/variables-reference#_is-variable-substitution-supported-in-user-and-workspace-settings

chapmandu commented 1 year ago

I've run into this same issue. In my case, the workspaceFolder would be perfect.

"cflint.jarPath": "${workspaceFolder}/CFLint-1.5.0-all.jar"

psarin commented 9 months ago

Yes, supporting ${workspaceFolder} would be perfect.

psarin commented 9 months ago

FYI @gquittet @sfeldkamp @chapmandu @KamasamaK , submitted PR https://github.com/KamasamaK/vscode-cflint/pull/33 to address this issue.