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: output which pattern matched #384

Open
mhlakhani opened this issue Dec 3, 2024 · 2 comments
Open

Feature request: output which pattern matched #384

mhlakhani opened this issue Dec 3, 2024 · 2 comments

Comments

@mhlakhani
Copy link

I'm using a comby template with multiple pattern in a TOML file. When I try to print matches with e.g.

comby -config ~/tmp/comby/rules.toml -f .proto -matcher .generic -json-lines -match-only | jq

I get multiple matches (as expected) but there's no easy programmatic way to see which pattern matched. Would it be possible to include that in the output?

It's not hard to work around (for my use case I can run it multiple times, one rule at a time), so this is more of a minor request.

@rvantonder
Copy link
Member

Hi! To clarify, is it that, for multiple rules, you would like to see which rule name/pattern matched for a given result? E.g., in the JSON, I might add something like "rule": <name> ?

@mhlakhani
Copy link
Author

That's exactly what I was looking for, yeah -- thanks!

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