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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to exclude files from churn #1091

Closed
spenserblack opened this issue Jun 20, 2023 · 4 comments
Closed

Add option to exclude files from churn #1091

spenserblack opened this issue Jun 20, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@spenserblack
Copy link
Collaborator

Summary 馃挕

Nice to see this feature in action!

Proposing an option --churn-exclude to exclude certain files from the churn metrics. To pair with --exclude, it should probably take 1 or more glob patterns in the format --churn-exclude '**.foo' 'assets/*.png'

Alternatively, --exclude can be used to ignore files for churn metrics. Some users might be surprised to --exclude a file and still see it in the churn metric.

Motivation 馃敠

When trying out this new feature, I noticed that .snap files for snapshot tests were getting picked up. These can be expected to change a lot, and as a result it's not necessarily useful to see a churn metric for these files. The same is probably true for other generated assets. So it might be useful to be able to ignore certain files.

@spenserblack spenserblack added the enhancement New feature or request label Jun 20, 2023
@spenserblack
Copy link
Collaborator Author

Sorry for requesting something that will require a refactor to pass around the config so soon after a release 馃槩

@o2sh
Copy link
Owner

o2sh commented Jun 21, 2023

Sorry for requesting something that will require a refactor to pass around the config so soon after a release 馃槩

No worries! The reason why I was so eager to push a new release was to get feedback, which seems to be working 馃槃

Proposing an option --churn-exclude to exclude certain files from the churn metrics.

That's a great idea, and I agree that it should behave the same way as the --exclude flag and accept patterns.

Alternatively, --exclude can be used to ignore files for churn metrics.

I don't know, maybe we could decouple the two and explain the difference between them in a help message, or by finding a more specific name. Some users may want to exclude certain files/folders from the churn while still having them taken into account in the language distribution 馃

@spenserblack
Copy link
Collaborator Author

Some users may want to exclude certain files/folders from the churn while still having them taken into account in the language distribution

Sounds good to me! That was my initial instinct, but then I had trouble thinking of a real-world example where I'd want to exclude files from churn metrics but include them for everything else, since my use case is generated files.

@o2sh o2sh self-assigned this Jul 14, 2023
@o2sh
Copy link
Owner

o2sh commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@o2sh o2sh added the stale label Sep 17, 2023
@o2sh o2sh closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants