This is an archive of the discontinued LLVM Phabricator instance.

[clang][docs] Remove untracked files from formatted status
ClosedPublic

Authored by njames93 on Jun 28 2020, 12:49 AM.

Details

Summary

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>.

Diff Detail

Event Timeline

njames93 created this revision.Jun 28 2020, 12:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2020, 12:49 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MyDeveloperDay accepted this revision.Jun 28 2020, 1:48 AM

Thank you for this, I’m happy with this and can take a look at removing the os.walk I agree it might be better/quicker

This revision is now accepted and ready to land.Jun 28 2020, 1:48 AM
This revision was automatically updated to reflect the committed changes.

The net result is an actual reduction in the overall %

The net result is an actual reduction in the overall %

Is that a bad thing?

MyDeveloperDay added a project: Restricted Project.Jun 29 2020, 1:34 AM

The net result is an actual reduction in the overall %

Is that a bad thing?

Not really, just a little disappointed ;-(

Is that a bad thing?

Not really, just a little disappointed ;-(

I'm gonna hazard a guess the removal of these directories is the reason the % went down