Skip to content

Commit

Permalink
Teach the include sorter to skip files under test trees and under INPUTS
Browse files Browse the repository at this point in the history
trees. This allows running the input sorter on the entire clang
repository cleanly now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169247 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Dec 4, 2012
1 parent 1ff3d66 commit fd02579
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/sort_includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

def sort_includes(f):
"""Sort the #include lines of a specific file."""

# Skip files which are under INPUTS trees or test trees.
if 'INPUTS/' in f.name or 'test/' in f.name:
return

lines = f.readlines()
look_for_api_header = os.path.splitext(f.name)[1] == '.cpp'
found_headers = False
Expand Down

0 comments on commit fd02579

Please sign in to comment.