Thread (2 messages) 2 messages, 2 authors, 2025-03-30

Re: [PATCH v3 0/1] userdiff: improve Bash function and word regex patterns

From: MOUMITA DHAR <hidden>
Date: 2025-03-30 12:36:16

On Sun, 30 Mar 2025 at 00:56, Junio C Hamano [off-list ref] wrote:
Moumita [off-list ref] writes:
quoted
    + ## t/t4018/bash-bashism-style-multiline-function (new) ##
    +@@
    ++function RIGHT \
    ++{
    ++    echo 'ChangeMe'
    ++}
    + \ No newline at end of file
    +
    + ## t/t4018/bash-posix-style-multiline-function (new) ##
    +@@
    ++RIGHT() \
    ++{
    ++    ChangeMe
    ++}
    + \ No newline at end of file
For these new test, is it essential that these sample files end in
incomplete lines?  In other words, are these tests trying to make
sure that the function line is correctly found even if the function
body is at the end of the file that lack the final terminating LF?
No , the skipping of newline at the end of the test files is not intended.The tests are only meant to check multiline function detection, ensuring that a function body starting on the next line after a line continuation \ is correctly recognized.
If that is what they are testing, please add comments near the
beginning of the file to tell future developers that it is essential
that they keep these files end in incomplete lines and why.

If that is not what these tests are checking, then make these lines
complete lines instead, as they waste future developers' time making
them wonder if there are valid reasons why these files must end in
incomplete lines.
Yes I will do that and send the patch again . Thank you for the feedback.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help