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

feat: Support filter by source branch #829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hoangatuan
Copy link

Description

Currently, we don't support filter results only on changed/added files. This PR adds logic to support that feature.

How it works?

  1. Using periphery scan to get the outputs.
  2. Use 'git diff $sourceBranch --path $filePath' to get all the changes in that file. (filePath comes from the output.declaration.location.path)
  3. Compare the output.declaration.location.line with the newLineStart and newLineSpan from the diff. If it matches, then it's a new/changed line.

Notes

This is a propose idea and solution. I haven't updated the tests. If you feel the feature and the solution is okay, I will update the tests.
Please take a look and let me know if you have any suggestions. Thank you

@hoangatuan
Copy link
Author

Hi @ileitch, I have a proposal here. It will be nice if you can take a look when you have time. Thank youu

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.

1 participant