Skip to content

Conversation

@daantimmer
Copy link
Collaborator

No description provided.

@daantimmer daantimmer requested a review from a team as a code owner May 2, 2025 21:22
@github-actions
Copy link

github-actions bot commented May 2, 2025

Test Results

24 tests  ±0   24 ✅ ±0   2s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 3bcf58d. ± Comparison against base commit b0a312c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 2, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.02s
✅ CPP clang-format 81 1 0 0 0.57s
✅ DOCKERFILE hadolint 1 0 0 0.11s
✅ JSON jsonlint 8 0 0 0.18s
✅ JSON prettier 8 6 0 0 0.5s
⚠️ MARKDOWN markdownlint 4 1 2 0 0.73s
⚠️ MARKDOWN markdown-link-check 4 2 0 330.56s
✅ MARKDOWN markdown-table-formatter 4 1 0 0 0.18s
✅ REPOSITORY checkov yes no no 14.66s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 20.72s
✅ REPOSITORY ls-lint yes no no 0.06s
✅ REPOSITORY secretlint yes no no 1.03s
✅ REPOSITORY syft yes no no 0.92s
✅ REPOSITORY trivy yes no no 6.8s
✅ REPOSITORY trivy-sbom yes no no 0.07s
✅ REPOSITORY trufflehog yes no no 7.36s
⚠️ SPELL lychee 49 30 0 8.43s
✅ YAML prettier 10 0 0 0 0.56s
✅ YAML v8r 10 0 0 4.54s
✅ YAML yamllint 10 0 0 0.49s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@daantimmer daantimmer requested a review from Copilot May 3, 2025 18:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates hook execution by switching from using StepContext to ScenarioContext for BEFORE/AFTER_STEP hooks. The key changes include:

  • Updating context initialization in ContextManagerInstance.hpp.
  • Adjusting test assertions in TestHookExecutor.cpp.
  • Modifying the HookExecutor.cpp constructor to use ScenarioContext instead of StepContext.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
cucumber_cpp/library/engine/test_helper/ContextManagerInstance.hpp Updates context initialization to inline construction of scoped contexts.
cucumber_cpp/library/engine/test/TestHookExecutor.cpp Changes test assertions to use ScenarioContext for hook execution.
cucumber_cpp/library/engine/HookExecutor.cpp Updates StepScope constructor to use ScenarioContext for consistency.

@daantimmer daantimmer requested a review from Copilot May 3, 2025 18:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the hook behavior by updating the context used in BEFORE/AFTER_STEP hooks to use ScenarioContext instead of StepContext and corrects a naming typo.

  • Replaced StepContext with ScenarioContext calls in hook-related files.
  • Corrected the misspelling of ScopedFeautureContext to ScopedFeatureContext throughout the code.
  • Updated context instantiation in the ContextManagerInstance to use locally scoped context objects.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cucumber_cpp/library/engine/test_helper/ContextManagerInstance.hpp Updated context instantiation; changed from member initialization to local variable creation for context scopes.
cucumber_cpp/library/engine/test/TestHookExecutor.cpp Replaced StepContext assertions with ScenarioContext assertions.
cucumber_cpp/library/engine/TestExecution.hpp Fixed a spelling typo in the ScopedFeatureContext declaration.
cucumber_cpp/library/engine/HookExecutor.cpp Updated hook initialization to use ScenarioContext instead of StepContext.
cucumber_cpp/library/engine/ContextManager.hpp Corrected struct name from ScopedFeautureContext to ScopedFeatureContext.
cucumber_cpp/library/engine/ContextManager.cpp Updated all internal references to the corrected ScopedFeatureContext.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2025

@daantimmer daantimmer enabled auto-merge (squash) May 3, 2025 18:24
@daantimmer daantimmer merged commit a76cdd4 into main May 3, 2025
14 checks passed
@daantimmer daantimmer deleted the feature/fix-step-hook-execution-context branch May 3, 2025 18:25
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

Successfully merging this pull request may close these issues.

2 participants