Skip to content

InsertNewlineAtEOF still does not insert a newline character at EOF in 20.1.8 #166760

@basilm4r0

Description

@basilm4r0

With this .clang-format config file:

InsertNewlineAtEOF: 'true'
KeepEmptyLinesAtEOF: 'true'

If I create a file called foobar.cpp and write to it:

int foobar () {
return 0;
}

and then run 'clang-format foobar.cpp', the output is:

int foobar() { return 0;}

No newline character is being inserted at the end of the file.

LLVM version is 20.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions