Skip to content

file-trailing-single-newline shows error after fixing files #18

@jackbentley

Description

@jackbentley

Running file-trailing-single-newline results in the following error. However, the files are fixed correctly. Rerunning it doesn't pick anything up and returns successfully.

$ file-trailing-single-newline --fix --path=./

$ find ./ -type f    -print0 | xargs -0 -P 8 -n1  sh -c 'if [ -f "${1}" ]; then aci-trailing-newline -1 "$1" || ((echo "" >> "$1" && sed -i "" -e :a -e "/^\n*\$/{\$d;N;ba" -e "}" "$1") && echo "Fixing: $1" || echo "FAILED: $1"); fi' --
Fixing: ./file.conf
[ERR] Some files do not have exactly one trailing newline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions