Преглед на файлове

ci: auto-fix missing newline at end of file

Thales Macedo Garitezi преди 1 година
родител
ревизия
8c4a67de31
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      scripts/check-nl-at-eof.sh

+ 2 - 0
scripts/check-nl-at-eof.sh

@@ -32,6 +32,8 @@ n=0
 while read -r file; do
 while read -r file; do
     if ! nl_at_eof "$file"; then
     if ! nl_at_eof "$file"; then
         echo "nl_at_eof: $file"
         echo "nl_at_eof: $file"
+        # shellcheck disable=SC1003
+        sed -i -e '$a\' "$file"
         n=$(( n + 1 ))
         n=$(( n + 1 ))
     fi
     fi
 done < <(git ls-files)
 done < <(git ls-files)