Skip to content

Commit ba334fb

Browse files
committed
Fixed colcon ignore detection
1 parent c5eeb20 commit ba334fb

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

package_xml_validation/helpers/workspace.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def get_pkgs_in_wrs(path: Path) -> list[str]:
182182
def _is_ignored_dir(path: Path) -> bool:
183183
"""
184184
Return True if `path` or any ancestor contains an ignore marker:
185-
- 'coclon_ignore' (as requested)
186-
- 'COLCON_IGNORE' (colcon's standard)
185+
- 'colcon_ignore'
186+
- 'COLCON_IGNORE'
187187
188188
Args:
189189
path: Directory path to inspect.
@@ -194,7 +194,7 @@ def _is_ignored_dir(path: Path) -> bool:
194194
"""
195195
path = path.resolve()
196196
for parent in (path, *path.parents):
197-
if (parent / "coclon_ignore").exists() or (parent / "COLCON_IGNORE").exists():
197+
if (parent / "colcon_ignore").exists() or (parent / "COLCON_IGNORE").exists():
198198
return True
199199
return False
200200

tests/test_workspace.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ def test_find_workspace_root_raises_outside_ws(self):
167167

168168
# --- pkg_iterator -------------------------------------------------------
169169
def test_pkg_iterator_lists_pkgs_and_respects_colcon_ignore(self):
170-
self.t.print_tree() # Debug: print the temp tree structure
171170
pkgs = SUT.pkg_iterator(self.ws / "src")
172-
print(pkgs.keys())
173171
self.assertEqual(set(pkgs.keys()), {"inner_pkg", "pkg1", "pkg_nameless"})
174172
self.assertNotIn("pkg_ignored", pkgs)
175173
self.assertNotIn("third_pkg", pkgs)

0 commit comments

Comments
 (0)