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

fix: godog step definitions within method declarations #215

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

tigh-latte
Copy link
Member

@tigh-latte tigh-latte commented Jun 14, 2024

🤔 What's changed?

Add treesitter queries for finding godog steps within methods.

⚡️ What's your motivation?

We currently load up our godog steps from a method with variable attributes attached, so the language service isn't finding them.

So, while this currently works:

func Steps(sc *godog.ScenarioContext) {
    sc.Given(`^I test this change$`, handler)
}

This doesn't:

func (s suite) Steps(sc *godog.ScenarioContext) {
    sc.Given(`^I test this change$`, s.handler)
}

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

Nope it's all good.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@tigh-latte tigh-latte added the 🐛 bug Defect / Bug label Jun 14, 2024
Copy link
Member

@kieran-ryan kieran-ryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound! Appreciated, apologies for delay to review. Buíochas

@kieran-ryan kieran-ryan merged commit 0d28333 into cucumber:main Jul 4, 2024
6 checks passed
@tigh-latte
Copy link
Member Author

Fadhb ar bith a chara

@kieran-ryan kieran-ryan changed the title Fix: Find godog step definitions within method_declaration Fix: Find godog step definitions within method declarations Jul 14, 2024
@kieran-ryan kieran-ryan changed the title Fix: Find godog step definitions within method declarations fix: Find godog step definitions within method declarations Jul 14, 2024
@kieran-ryan kieran-ryan changed the title fix: Find godog step definitions within method declarations fix: godog step definitions within method declarations Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants