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

Add support to run over multiple files or directories #69

Merged
merged 1 commit into from Apr 28, 2019
Merged

Conversation

boyter
Copy link
Owner

@boyter boyter commented Apr 17, 2019

Implements request #61 where you can pass in multiple files or directories on the command line and scc will process them as instructed. Biggest change is that the file walker is no longer responsible for closing its stream. This makes the code that spawns them a little more ugly since it now needs to have a waitgroup to track this but I don't seen an obvious way to improve it.

Appears to work over everything I tried. There may be the old ulimit issue again if the directories passed in are large enough, but I was not able to trigger it on my machine.

@boyter
Copy link
Owner Author

boyter commented Apr 18, 2019

Ill be away till around the 29th of May so if you are happy merge, if not ill look after any feedback when I get back. No issues either way.

@boyter boyter added the enhancement New feature or request label Apr 18, 2019
@dbaggerman
Copy link
Collaborator

Looks good to me. Having a monitor goroutine close a chan when a waitgroup completes is a pattern I've used for dealing with multiple writers. I usually prefer to break out explicit manager/worker functions rather than using nested inline go func() but it's not a big deal.

@dbaggerman dbaggerman merged commit d796740 into master Apr 28, 2019
@boyter boyter deleted the issue61 branch April 29, 2019 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants