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

Missing warnings when scenario passing argumens but step does not specify them #5

Open
ya-netgrp opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ya-netgrp
Copy link

ya-netgrp commented Aug 15, 2023

Currently if scenario passes arguments to a step but step definition doesn't declare any arguments there are no warning about that.
I think to avoid possible bugs it should be handled similar when you pass argument to a function that does not define any arguments: fail with error in compile time. Or at least produce a warning.

Not sure if bug or possible enchantment thought.

@ya-netgrp ya-netgrp changed the title Missing warnings when passing argumens but step does not specify them Missing warnings when scenario passing argumens but step does not specify them Aug 15, 2023
@anyalir
Copy link
Owner

anyalir commented Jul 11, 2024

Hmm, I see. The problem is that the macros generating the functions for the steps and the macros generating the step-calling functions make some assumptions to have a more forgiving syntax. One of the assumptions is that they will always pass an argument list, even if it's empty. There may be some way to add more function clauses that would cause the keyword lists to only be passed through if defined in the scenario step. I'll have to think about it, thanks for the feedback at any rate!

@anyalir anyalir added the enhancement New feature or request label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants