Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore folders with an AMENT_IGNORE file, e.g. build spaces #81

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ament_clang_format/ament_clang_format/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ def get_files(paths, extensions):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
dirnames.sort()
Expand Down
3 changes: 3 additions & 0 deletions ament_copyright/ament_copyright/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def get_files(paths, extensions, skip_package_level_setup_py=True):
if is_repository_root(path):
add_files_for_all_filetypes(path, files)
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
if is_repository_root(dirpath):
add_files_for_all_filetypes(dirpath, files)

Expand Down
3 changes: 3 additions & 0 deletions ament_cppcheck/ament_cppcheck/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def get_files(paths, extensions):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
dirnames.sort()
Expand Down
3 changes: 3 additions & 0 deletions ament_cpplint/ament_cpplint/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ def get_file_groups(paths, extensions):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
dirnames.sort()
Expand Down
3 changes: 3 additions & 0 deletions ament_lint_cmake/ament_lint_cmake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def get_files(paths):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
dirnames.sort()
Expand Down
3 changes: 3 additions & 0 deletions ament_pyflakes/ament_pyflakes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def get_files(paths):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
dirnames.sort()
Expand Down
3 changes: 3 additions & 0 deletions ament_uncrustify/ament_uncrustify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ def get_files(paths, extensions, excludes=[]):
for path in paths:
if os.path.isdir(path):
for dirpath, dirnames, filenames in os.walk(path):
if 'AMENT_IGNORE' in filenames:
dirnames[:] = []
continue
# ignore folder starting with . or _
dirnames[:] = [d for d in dirnames if d[0] not in ['.', '_']]
# ignore excluded folders
Expand Down