Problem: With ":source ++dryrun" a builtin function in the value of a
legacy ":const" or in a function name with braces is called,
and only the skipping of commands keeps a line that is taken
for a command from running a shell command or writing a file.
Solution: Do not execute a legacy ":const" in a dry run. Give an error
for any function call (E1588), and for a shell command, a
written file and the other things check_secure() refuses, and
for a command that does not define something right before it
would be executed (E1589).
Test_source_dryrun_no_side_effect checks that the value of a legacy
":const" calling writefile() creates no file, that a function name with
braces calling writefile() gives E1584 and creates no file, and that the
lines after an "endfunction" inside an unrecognized "py3<<EOF" heredoc
with ":w!" and system() create no file.
related: #21257
https://github.com/vim/vim/pull/21425
(9 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()