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

Feature request: allow filtering results with minBytes #32

Open
drodil opened this issue Mar 12, 2024 · 2 comments · May be fixed by #35
Open

Feature request: allow filtering results with minBytes #32

drodil opened this issue Mar 12, 2024 · 2 comments · May be fixed by #35
Labels
cli usage Related to the CLI enhancement New feature or request in progress This is being worked on output Related to the output or display

Comments

@drodil
Copy link
Contributor

drodil commented Mar 12, 2024

Sometimes the linguist-js reports languages that have very few bytes. Could it be possible to add a new option to filter by minimum number of bytes for example:

linguist-js --minBytes 100
@Nixinova Nixinova added enhancement New feature or request cli usage Related to the CLI node usage Related to Node usage and removed node usage Related to Node usage labels Mar 14, 2024
@Nixinova
Copy link
Owner

Nixinova commented May 8, 2024

Could maybe do a bit more than that and allow something like linguist-js --minSize 5b / 7kb / 2%, say?

@Nixinova Nixinova added output Related to the output or display in progress This is being worked on labels Jul 22, 2024
Nixinova added a commit that referenced this issue Jul 23, 2024
An implementation of a `minSize` option (proposed in #32).

This allows filtering the output to only show languages with a resulting size greater than what the user inputs.

This is done by moving the results of these too-small languages to an `other` key and deleting the original results.

This may be too ad-hoc - for instance, maybe this should be a CLI-only option and the actual data isn't changed? Is the `other` key needed, or not?

For this reason this feature is not being committed straight to main and will sit as a pull request for proposal.
@Nixinova
Copy link
Owner

I've made a possible implementation of this feature - however I'm not 100% on the method I've chosen so feedback over at #35 would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli usage Related to the CLI enhancement New feature or request in progress This is being worked on output Related to the output or display
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants