-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat: ignore dot directories and files #337
Conversation
Codecov Report
@@ Coverage Diff @@
## main #337 +/- ##
==========================================
- Coverage 68.33% 68.16% -0.17%
==========================================
Files 35 35
Lines 6594 6613 +19
==========================================
+ Hits 4506 4508 +2
- Misses 1836 1848 +12
- Partials 252 257 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -51,6 +51,15 @@ func TestStacksInit(t *testing.T) { | |||
layout: []string{"s:stack"}, | |||
input: []string{"stack"}, | |||
}, | |||
{ | |||
name: "dot directories are not allowed", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we disallow terramate init .stack
@@ -49,6 +50,10 @@ func ListStacks(root string) ([]Entry, error) { | |||
return filepath.SkipDir | |||
} | |||
|
|||
if strings.HasPrefix(info.Name(), ".") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extreme feeling of we needing our fs interface + having a generalization that builds a fs interface that doesnt list dot dirs/files on top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + non blocking comments
if strings.HasSuffix(path, "/.git") { | ||
return filepath.SkipDir | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need the .git logic to skip the dir anymore, it skips all dotdirs
…re-dot-files-and-dirs
No description provided.