Transforming input before reporting #1067
Open
+27
−18
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.
Hey there,
We had the need to sometimes apply some transformations on the content of code files before getting the statistics for them. Right now
tokei
was not really giving us the possibility to do that.Therefor I did take a look at the code and thought this would be easy to add, without affecting any existing functionality. Would be cool if we could get that integrated into an upcoming version.
What i did is, I added another Config option, which allows to pass a function, which will transform the text content of a file before getting the statistics.
Would love to hear your thoughts, and happy to adapt the feature in a way that might suit the project better.