[all-commits] [llvm/llvm-project] abafb6: [clang][docs] Remove untracked files from formatte...

Nathan James via All-commits all-commits at lists.llvm.org
Sun Jun 28 01:50:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: abafb655c85d92c02c19c8723ef9ecc5d48574bf
      https://github.com/llvm/llvm-project/commit/abafb655c85d92c02c19c8723ef9ecc5d48574bf
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-06-28 (Sun, 28 Jun 2020)

  Changed paths:
    M clang/docs/tools/generate_formatted_state.py

  Log Message:
  -----------
  [clang][docs] Remove untracked files from formatted status

Currently on http://clang.llvm.org/docs/ClangFormattedStatus.html there are format stats on files no actually inside the tree but generated by build scripts. These are usually copied from somewhere else. Right now for example there are files from `llvm/utils/release/llvm-package...`. Adding these files bloats the list while not giving an accurate representation of how formatted the repo is.
This addresses this issue by checking the git index and ignoring any folder that doesn't contain tracked files.

I'm still unsure whether it would be better to just do away with the `os.walk` method and just check over every file returned from `git ls-index <project-root>`.

Reviewed By: MyDeveloperDay

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




More information about the All-commits mailing list