Perl-LanguageServer
Perl-LanguageServer copied to clipboard
needs to use taint switch if used on the shebang line
just like https://github.com/vim-syntastic/syntastic/issues/422 Perl complains if you edit a script with the following shebang line:
#!/usr/bin/perl -T
with the message:
"-T" is on the #! line, it must also be used on the command line at - line 1.
So, if these flags are present on the shebang line, PLS should invoke perl with -t
or -T
.
This is especially important because Perl will not go further than this and will not check for any other errors.
Setting the flag in the config does not work:
"perl.perlCmd": "perl -T",
[Error - 3:09:35 PM] Starting client failed
Launching server using command perl -T failed.
silly attempt to make it work by modifying line https://github.com/richterger/Perl-LanguageServer/blob/master/lib/Perl/LanguageServer/SyntaxChecker.pm#L243 seem to work
$ret = run_cmd ([$self -> perlcmd, '-T', '-c', @inc],
For debugging: Adding a config option runtimeArgs like in https://code.visualstudio.com/docs/nodejs/nodejs-debugging would be easy.
You asked for syntax checking: Maybe your proposal is not stupid. I can't see, why not doing so. :-) Since taint mode should work only when running a program and not only checking.
Of course debugging is still open and has the same problem. But the same fix is not good.
Syntax check and taint is fix in pull request #172