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 path pattern filter option to linesOfCode #1095

Merged
merged 4 commits into from
Jan 4, 2021

Conversation

MelvinVermeer
Copy link
Contributor

@MelvinVermeer MelvinVermeer commented Dec 23, 2020

Filter linesOfCode with glob pattern

When checking linesOfCode of a PR some teams might only want to include the ./src folder in the count. Or exclude the *.json files.

This PR adds the optional parameter pattern to the linesOfCode function. If provided, only file paths that match the glob pattern will be included in the resulting count. If omitted, the behavior remains unchanged.

TODO

I'm aware that there is stuff to be done before merging this PR. Just opening as draft to get input on the idea.

@orta
Copy link
Member

orta commented Dec 24, 2020

Yeah, this seems good to me - the reference docs are auto-generated so no need to worry there 👍🏻

@MelvinVermeer MelvinVermeer marked this pull request as ready for review December 28, 2020 17:23
@MelvinVermeer
Copy link
Contributor Author

@orta Is there anything you expect from my side?

@orta
Copy link
Member

orta commented Jan 4, 2021

Nope, just didn't see it switch - so in theory, I expected this ping.

Nice work

@orta orta merged commit cf39ac0 into danger:master Jan 4, 2021
@MelvinVermeer MelvinVermeer deleted the lines-of-code-pattern branch January 5, 2021 07:27
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

2 participants