microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

warn about trailling space #466

Open guettli opened 1 year ago

guettli commented 1 year ago

I had this issue:

foo:
    helm repo update foo
    helm upgrade --install ccm-foo foo/ccm-foo \
        --version 0.1.2 \XXXX
        --namespace kube-system

But there was no "XXXX", but there were spaces.

I got a strange error:

Error: "helm upgrade" requires 2 arguments

It took me some time to understand that the trailing spaces after "--version 0.1.2 \" where the root cause.

Please make this visible somehow in the makefile plugin of vscode.

New comers could waste hours with this confusing whitespace handling.

andreeis commented 1 year ago

@guettli, thank you for pointing out this scenario. Until now, this was out of scope for this extension. When it came to IntelliSense, MakefileTools was providing it for C/C++ files in case they were built with make via makefiles. We were not looking at the makefile code itself. We are expanding the scope now and we will implement various such scenarios which we consider "makefile language service". We'll have clearer timelines and order of work items in the near future.

notpeter commented 9 months ago

@guettli Assuming you never want trailing whitespace in your Makefiles you might consider adding an .editorconfig like so:

root = true 

[Makefile]
indent_style = tab
trim_trailing_whitespace = true

Then if you add the editorconfig.editorconfig extension VSCode will auto-trim that for you on save.