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

WIP:Report found files & folders while scanning #39

Closed

Conversation

leonklingele
Copy link
Contributor

  • I've read Contribution guide
  • I've tested everything that doesn't relate to tcell.Screen API

Todo:

  • Show progress in textbar

This is the basis for #14

@codecov-io
Copy link

Current coverage is 100% (diff: 100%)

Merging #39 into master will not change coverage

@@           master   #39   diff @@
===================================
  Files           7     7          
  Lines         221   224     +3   
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
+ Hits          221   224     +3   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update ad7a702...3d77348

if !reflect.DeepEqual(*result, File{}) {
t.Error("GetSubTree didn't return emtpy file on ReadDir failure")
}
}

func dummyProgressConsumer(progress <-chan int) {
for range progress {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are actually not testing that the functionality you implemented works

}()
go func() {
for range ticker.C {
log.Printf("Scanning.. Already found %d objects\n", objs)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

objects? Would "files" describe better what we found?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you consider 'folders' to also be 'files'?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. We are now using folder/tree/file, often interchangeably. I think we should come up with naming convention going forward. I was thinking about calling everything file, but that might be more confusing. Maybe we can say that folder is a special case of file and stop using tree completely? What's your opinion?

@@ -78,7 +78,9 @@ func TestGetSubTreeOnSimpleDir(t *testing.T) {
}},
}}
ignoredFolders := map[string]struct{}{"g": struct{}{}}
result := GetSubTree("b", nil, createReadDir(testStructure), ignoredFolders)
progress := make(chan int, 0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 0 here is default (channel not buffered), we might omit that

@leonklingele
Copy link
Contributor Author

Superseeded by #60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants