[all-commits] [llvm/llvm-project] e59891: [clang-tidy] Force LF newlines when writing files

Richard Thomson via All-commits all-commits at lists.llvm.org
Tue Jan 18 08:40:56 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e598913a4734ce682732703bb362dc3c5c0079c0
      https://github.com/llvm/llvm-project/commit/e598913a4734ce682732703bb362dc3c5c0079c0
  Author: Richard <legalize at xmission.com>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/add_new_check.py

  Log Message:
  -----------
  [clang-tidy] Force LF newlines when writing files

The recommendation on Windows is to checkout from git with
core.autolf=false in order to preserve LF line endings on
test files.  However, when creating a new check this results
in modified files as having switched all the line endings on
Windows.  Write all files with explicit LF line endings to
prevent this.

Fixes #52968

Differential Revision: https://reviews.llvm.org/D117535




More information about the All-commits mailing list