Skip to content

Commit 64bdbf1

Browse files
committed
Allow hidden paths to be referenced
Using other git repo tools, such as GitLab, have different practices about how to organize CI config files, even GitHub has hidden paths practices, so ignoring a reference inside one of these folder is important, and shouldn't be ignored.
1 parent 92d3df3 commit 64bdbf1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

doorstop/core/vcs/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ def paths(self):
9494
# Skip ignored paths
9595
if self.ignored(relpath):
9696
continue
97-
# Skip hidden paths
98-
if os.path.sep + "." in os.path.sep + relpath:
97+
# Skip hidden paths according to settings definition
98+
if not settings.ALLOW_HIDDEN_PATH_REFERENCES:
9999
continue
100100
self._path_cache.append((path, filename, relpath))
101-
yield from self._path_cache
101+
yield from self._path_cache
102102

103103
def ignored(self, path):
104104
"""Determine if a path matches an ignored pattern."""

doorstop/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
PLACEHOLDER = "..." # placeholder for new item UIDs on export/import
2525
PLACEHOLDER_COUNT = 1 # number of placeholders to include on export
2626

27+
# VCS Behaviour
28+
ALLOW_HIDDEN_PATH_REFERENCES=False
29+
2730
# Formatting settings
2831
MAX_LINE_LENGTH = 79 # line length to trigger multiline on extended attributes
2932

0 commit comments

Comments
 (0)