I made a suggested edit on a recent answer.
The author of the answer provided a nice solution to the question, but it looks like he didn't have the time to debug it, so his script ended up with some typos, that would prevent someone to use it directly. Namely:
- There was a quoted string that wasn't terminated, so the script couldn't be executed at all
- The script used
"$*"
instead of"$@"
, which would cause problems if one of the commands had an argument with spaces in it. - The script was using the 'exit code of the last command' variable
$?
, but its value was overwritten by anif
statement between issuing the command and using the exit code.
Other that that the answer was very good, innovative, and provided a viable solution to the problem, that hadn't been proposed before in that thread.
So I suggested an edit that fixed all these problems, and also upvoted the answer, which already had been downvoted by someone due to the above typos.
But to my surprise, the edit was rejected, and both reviewers used this justification:
This edit was intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.
In my opinion this seems nonsensical. I was absolutely NOT addressing the author of the post. I am pretty sure he understands all these issues, but simply didn't notice them, because he didn't test the script (maybe he was on mobile?). It was intended for all the future viewers, that would try to run the script, and possibly be confused if they had less experience in bash.
In addition, the edit,
- was not appropriate as a comment, since newline characters are not available in comments
- was not appropriate as a new answer. Posting as a new answer would be plagiarism, since the idea behind the script had already be posted, and the new answer would just be typo fixes.
So my question is was the suggested edit rejected in error? Or is there a policy on unix.SE, that slightly flawed answers shouldn't be fixed, and all the future readers should spend time debugging around the typos?
If the reviewers aren't confident enough to evaluate the given answer, shouldn't they skip the reviews, rather than letting scripts with typos stay in answers?
Note that both reviewers seem to be "mass-rejectors", in the sense that they have both rejected 55% - 65% percent of their approved suggested edits.
||
to&&
; change"$*"
to"$@"
; and, because of the!
,failed
is always set to 0.»