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] Make cr-filter-pragma Part of the Config File #523

Closed
FloatingSunfish opened this issue Aug 5, 2021 · 2 comments
Closed

Comments

@FloatingSunfish
Copy link

FloatingSunfish commented Aug 5, 2021

Currently, you need to run cr-filter-pragma your_session.sqlite after an init in order to exclude code marked with # pragma: no mutate comments from mutation.

My proposal is to make cr-filter-pragma part of the configuration file to make it easier to use and more in line with other filters in the config file:

e.g.

[cosmic-ray.filters.pragma-filter]
enabled = true

This way, you only have to deal with it once and never have to run it as a command ever again.

@abingham
UPDATE: After our recent discussion on #522, I'm still hoping that this could get added since I assume it would just be a simple check in the config and doesn't involve anything as complex as excluded operator mutations. Do let me know your thoughts on how complex this would be though.

@abingham
Copy link
Contributor

abingham commented Aug 8, 2021

I'm really reluctant to add filtering back into the init phase. I know that keeping the filters separate from init adds an extra step, but in practice people just create shell scripts (or batch files) that run init and the filters they want. I'd prefer that all filters continue working on equal footing, rather than having some filters have special, built-in status.

I'll try to be receptive to arguments in favor of building certain filters into the init phase. I'd also consider some mechanism by which arbitrary filters could be run after init. But mostly I'd prefer that init stay "primitive" and filters stay separate.

@FloatingSunfish
Copy link
Author

@abingham
Noted on this. Perhaps now isn't the time to do this for filters.

Also, now that I re-read the docs, I do see an entry in the Filters section where a Batch File is recommended to be used.

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

No branches or pull requests

2 participants