Loading scripts/check-format.sh +4 −0 Original line number Diff line number Diff line Loading @@ -71,7 +71,11 @@ cl-format-apply() { ensure-one-newline() { # first command adds a newline at the end of the file if there might be none # -> clang-format-13 does not add them and warnings e.g. on MacOS are triggered by them sed -i -e '$a\' $1 # second command removes multiple newlines at the end of a file so that there is only one left # -> clang-format-13 does not do that, but complains about it sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' $1 } Loading Loading
scripts/check-format.sh +4 −0 Original line number Diff line number Diff line Loading @@ -71,7 +71,11 @@ cl-format-apply() { ensure-one-newline() { # first command adds a newline at the end of the file if there might be none # -> clang-format-13 does not add them and warnings e.g. on MacOS are triggered by them sed -i -e '$a\' $1 # second command removes multiple newlines at the end of a file so that there is only one left # -> clang-format-13 does not do that, but complains about it sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' $1 } Loading