Skip to content

Commit

Permalink
Allow hidden paths to be referenced
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lbiaggi committed Apr 25, 2024
1 parent 92d3df3 commit 066f1ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doorstop/core/vcs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def paths(self):
# Skip ignored paths
if self.ignored(relpath):
continue
# Skip hidden paths
if os.path.sep + "." in os.path.sep + relpath:
# Skip hidden paths according to settings definition
if not settings.ALLOW_HIDDEN_PATH_REFERENCES:
continue
self._path_cache.append((path, filename, relpath))
yield from self._path_cache
yield from self._path_cache

def ignored(self, path):
"""Determine if a path matches an ignored pattern."""
Expand Down
3 changes: 3 additions & 0 deletions doorstop/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
PLACEHOLDER = "..." # placeholder for new item UIDs on export/import
PLACEHOLDER_COUNT = 1 # number of placeholders to include on export

# VCS Behaviour
ALLOW_HIDDEN_PATH_REFERENCES=False

# Formatting settings
MAX_LINE_LENGTH = 79 # line length to trigger multiline on extended attributes

Expand Down

0 comments on commit 066f1ba

Please sign in to comment.