fix: Handle and warn when counting empty file#45
Closed
100gle wants to merge 2 commits into
Closed
Conversation
- Remove empty data validation in CountBytes method - Empty files now return zero statistics instead of errors - Update tests to reflect new behavior - Add comprehensive empty data handling tests Fixes issue where empty files would cause program to crash with 'input data cannot be empty' error during directory scanning.
- Add warning output to stderr when empty files are detected - Implement path display mode support in FileCounter - Add getDisplayPath method for flexible path formatting - Include comprehensive tests for empty file handling - Warning messages use appropriate path format based on display mode Empty files now show: 'Warning: Empty file detected: <path>'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main